-
Notifications
You must be signed in to change notification settings - Fork 2.8k
feat(next): improve fallback root params handling with hasFallbackRootParams flag #13653
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…tParams flag - Add hasFallbackRootParams flag to RoutesManifestRoute type - Simplify route regex generation when hasFallbackRootParams is true - Update prerender manifest handling for fallback routes - Improve conditional logic for fallback root params processing
ijjk
reviewed
Aug 1, 2025
ijjk
approved these changes
Aug 1, 2025
🦋 Changeset detectedLatest commit: 1df01af The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
wyattjoh
added a commit
to vercel/next.js
that referenced
this pull request
Aug 1, 2025
…es (#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: vercel/vercel#13653
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Aug 2, 2025
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. # Releases ## vercel@44.7.0 ### Minor Changes - Make framework detection text prettier ([#13654](#13654)) ### Patch Changes - Improve non-debug error log for user fetch ([#13657](#13657)) - Updated dependencies \[[`e9ef3b82c7093ac750173fc2a2d2747ba25f6c78`](e9ef3b8), [`b1993ee3af72d12859bbc621744b687fbc968a1b`](b1993ee)]: - @vercel/next@4.11.0 - @vercel/hono@0.0.8 - @vercel/node@5.3.10 ## @vercel/next@4.11.0 ### Minor Changes - Improve fallback root params handling with hasFallbackRootParams flag ([#13653](#13653)) - Add hasFallbackRootParams flag to RoutesManifestRoute type for simplified route regex generation - Update route handling logic to conditionally apply fallback root params processing - Enhance prerender manifest structure with fallback root params support ## @vercel/frameworks@3.7.6 ### Patch Changes - Fix issue where .mjs files weren't transpiled properly for Hono ([#13658](#13658)) ## @vercel/fs-detectors@5.4.12 ### Patch Changes - Updated dependencies \[[`b1993ee3af72d12859bbc621744b687fbc968a1b`](b1993ee)]: - @vercel/frameworks@3.7.6 ## @vercel/hono@0.0.8 ### Patch Changes - Fix issue where .mjs files weren't transpiled properly for Hono ([#13658](#13658)) - Updated dependencies \[[`b1993ee3af72d12859bbc621744b687fbc968a1b`](b1993ee)]: - @vercel/node@5.3.10 ## @vercel/node@5.3.10 ### Patch Changes - Fix issue where .mjs files weren't transpiled properly for Hono ([#13658](#13658)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
This PR improves the handling of fallback root parameters by introducing a
hasFallbackRootParams
flag to simplify route regex generation and enhance prerender manifest processing.Changes
hasFallbackRootParams
flag toRoutesManifestRoute
type for better type safetyhasFallbackRootParams
is true by using a more direct.rsc
suffixTest plan
Related Pull Request: vercel/next.js#82282