Nuxt prerendering to deep
Hi can someone please help me? I want to deploy my nuxt with
static deployment
with npm run generate
. But now my application generates a lot of routes this goes infinite. How can I fix this? My route structure is:
/cases/client-name
I use this structure:
pages/cases.vue
pages/cases/[...slug].vue
in my cases.vue
is a NuxtPage, because my slug
is in a sidebar.
See screenshots for clarification. So the problem is my prerender generates /cases/slug-1/another-slug/another-slug-1
. But it needs to generate: /cases/slug-1/
, /cases/slug-2
.
How can I fix this?4 Replies
maybe your internal links are not set up with a leading
/
?
so instead of /cases/another-slug
you just have another-slug
as the link?Jup, saw the error indeed.
Used
names
everywhere fixed it.
@manniL / TheAlexLichter Do I need to think about something with static deployment?
Had netlfiy beforeThat depends a lot on your app
but in general, new data = new deploy
Okay thanks!