New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
double catch-all doesn't work (both [...slug].vue
and a 404.vue
)
#14702
Comments
I can confirm that it doesnt work for me either. |
The issue is that I'll look into this and see if there's a way we can improve the DX here, or add something to the docs to make this clearer. https://v3.nuxtjs.org/guide/directory-structure/pages/#catch-all-route |
So if I understand it correctly, the only option is to remove the 404.vue and make a custom solution for the 404? |
In case you were facing this issue while trying to use Nuxt Content like I was then you might also want to use the #not-found slot to render your custom 404 content instead of using 404 as a page. |
Just hit this myself. Why is this only priority 3? Catch-all routes are very common in CMS driven Nuxt sites, as are the need for 404 pages. |
The issue isn't that catch-all routes don't work, but that adding two catch-all routes leads to unexpected results. |
[...slug].vue
and a 404.vue
)
I get that. That's also my point: having both a catch-all route and a 404 provision (another form of catch-all route) is very common, especially in CMS driven sites. |
Instead of using a separate route, you could also render a |
That's exactly what I've had to do for now. |
Environment
Reproduction
https://stackblitz.com/edit/nuxt-starter-87chgu?file=pages/[...slug].vue
Describe the bug
Catch-all routes don't work like in documentation - https://v3.nuxtjs.org/guide/directory-structure/pages#catch-all-route
Additional context
No response
Logs
No response
The text was updated successfully, but these errors were encountered: