-
-
Notifications
You must be signed in to change notification settings - Fork 461
Incorrect routing precedence for SSR #967
Comments
I think this should fix it: #974 - published in latest alpha. I think the cause is all dynamic routes are grouped together (including catch all), so if catch all is resolved first before other dynamic routes, the precedence may be wrong. It is tested in e2e tests but somehow (maybe due to naming of routes causing a coincidentally correct order?), the catch all always came after, so it happened to work. The fix will separate them distinctly so at runtime, we can try to match all dynamic routes before catch all routes. Non-dynamic/predefined routes should already be matched correctly. |
@mdsavian sorry I am not sure which issue you are talking about, seems not related to catch all route precedence? Could you please open an issue with more context include versions, serverless.yml file and what you are trying to do. Thanks! @darren-charterindex this is published in latest version, please comment in case of any issues |
I fall into a new issue with ISG revalidation, so I wait until #804 is resolved, thanks :D |
hello, I am seeing catch-all routes taking priority over dynamic routes on the SSR.
For example:
A request for
/products/123
CSR (correct)
SSR (incorrect)
A request for
/parent/child
CSR (correct)
SSR (correct)
A request for
/example
CSR (correct)
SSR (correct)
It is my understanding that the precedence for routes should be predefined > dynamic > catch-all > optional-catch-all
https://nextjs.org/docs/routing/dynamic-routes#caveats
This is happening on [email protected] and serverless-next.js@@1.19.0-alpha.39.
The text was updated successfully, but these errors were encountered: