next.js
526ab5ea - feat: add fallback root params support for prefetch segment data routes (#82282)

Commit
266 days ago
feat: add fallback root params support for prefetch segment data routes (#82282) ### What? Add support for generating prefetch segment data routes for pages with fallback root parameters. ### Why? When routes have fallback root parameters but no segment paths, the prefetch system wasn't generating the necessary rewrite rules. This caused client-side navigation to fail for these routes because the `/_tree` requests couldn't be properly rewritten to the prefetch RSC route. ### How? - Add `hasFallbackRootParams` flag and `prefetchSegmentDataRoutes` to `ManifestRoute` type - Generate inverse prefetch segment data routes for `/_tree` path when routes have fallback root params - Set flag to simplify route regex matching for these routes Related Pull Request: https://github.com/vercel/vercel/pull/13653
Author
Parents
Loading