Nicholas T
Nicholas T
NNuxt
Created by Nicholas T on 10/10/2024 in #❓・help
Components not loading when added as children to custom routes in nuxt.config.ts
Hi all. We recently upgraded from 3.4 to 3.12. We have some custom routes in our nuxt.config.ts file. The routes are created like this:
{
name: 'custom_page_root',
path: '/custom_thing/new',
file: '~/components/MyComponent.vue'
children: []
}
{
name: 'custom_page_root',
path: '/custom_thing/new',
file: '~/components/MyComponent.vue'
children: []
}
We also have some nested routes added as children arrays containing additional route objects like that. In these child routes, we specify which component should be loaded by adding something like file: '~/components/MyComponent.vue. This was working fine until upgrading Nuxt versions, and now, none of the components we add to these child route are rendering. The url route itself works fine, but the component specified in file: ... doesn't render at all, leaving us with a blank page where the component should be loading, but no errors. Has there been a change to how this is supposed to work? Previously, we went by the documentation for custom routing here: https://nuxt.com/docs/guide/recipes/custom-routing#pages-hook Note, this only seems to apply to child routes, and using this syntax in top-level routes works as it should.
1 replies
NNuxt
Created by Nicholas T on 5/3/2024 in #❓・help
Help with diagnosing and fixing a 10+ second hung process in Nuxt
No description
3 replies