azur
Explore posts from serversTrailing slash routes not working on Vercel with SSG
I have following scenario in my Nuxt 3 app.
I also have one "catch-all" component in my pages directory. pages -> [...slug].vue
TemplateRenderer.vue just displays page-template prop.
When I build this locally and test it SSG is working fine, however on Vercel SSG doesnt work for routes ending with trailing slash (if I visit for example /A/ or /A, SSG will not work, instead the site will be SSR-ed).
I've also tried to prerender routes without trailing slash, in that case prerendering works. However if I navigate for example to /A/ Nuxt will navigate me back to /A (it's not a server redirect, but it's happening on Vue router level).
This is sadly quite cruical to me since I'm tracking certain kind of data on my webpage and it gives false analytics (bounce rate is showing false values due to this). So any help or tips how to overcome this error either on Vercel or Nuxt level would be much appreciated.
5 replies