next.js
a87a0721 - fix(turbopack) Adjust the way catchall routes are handled when a more specific parallel route exists (#81634)

Commit
202 days ago
fix(turbopack) Adjust the way catchall routes are handled when a more specific parallel route exists (#81634) ## Improve App Router Route Prioritization ### What? Fixed a logic bug where we were failing to correctly identify routes as catchall routes due to treating parallel routes as a completed route path. This shouldn't happen because parallel routes do not affect the routing structure. ### How? - Modified the route selection logic to more clearly prioritize specific routes over catch-all routes - Make sure we only count true leaf nodes when determining when to use the catch-all. Parallel is not a leaf node - Added a test case to ensure middleware rewrites and redirects work correctly with both parallel and non-parallel catch-all routes. Fixes #PACK-4490
Author
Parents
Loading