[next]: ensure static data routes are used#14770
Merged
Conversation
🦋 Changeset detectedLatest commit: 03a5784 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 |
Contributor
📦 CLI Tarball ReadyThe Vercel CLI tarball for this PR is now available! Quick TestYou can test this PR's CLI directly by running: npx https://vercel-p5wfcyku3.vercel.sh/tarballs/vercel.tgz --helpUse in vercel.jsonTo use this CLI version in your project builds, add to your {
"build": {
"env": {
"VERCEL_CLI_VERSION": "vercel@https://vercel-p5wfcyku3.vercel.sh/tarballs/vercel.tgz"
}
}
} |
Contributor
🧪 Unit Test StrategyComparing: Strategy: Affected packages only ✅ Only testing packages that have been modified or depend on modified packages. Affected packages - 2 (5%)
Unaffected packages - 39 (95%)
Results
This comment is automatically generated based on the affected testing strategy |
c3308a8 to
f9e1dcc
Compare
f9e1dcc to
d68047d
Compare
d68047d to
06486bb
Compare
06486bb to
03a5784
Compare
ijjk
approved these changes
Jan 29, 2026
Merged
ztanner
pushed a commit
that referenced
this pull request
Jan 29, 2026
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@50.9.4 ### Patch Changes - Updated dependencies \[[`c0a87e350e67b67e1b8a3610cde16a7d86f931fd`](c0a87e3), [`1bc969a200180c5828212c43861c7548dbd3e51c`](1bc969a)]: - @vercel/next@4.15.19 ## @vercel/next@4.15.19 ### Patch Changes - Revert "[next] Remove 404.html prerenders from functions" ([#14793](#14793)) - ensure static .rsc outputs are served as fallbacks ([#14770](#14770)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
ztanner
added a commit
to vercel/next.js
that referenced
this pull request
Jan 29, 2026
This restores fast navigations to fully static PPR routes in Cache
Components, even when prefetch hasn’t completed or `prefetch={false}` is
used. In legacy versions of PPR, the `prefetchDataRoute` entries would
be populated with `.prefetch.rsc` values containing static RSC payloads.
This regressed in cache components, and the only static RSC payloads
were in the `.segments` directory. However, when Next.js triggers a
regular RSC request (non-prefetch), either because the prefetch hadn't
completed yet or `prefetch={false}` was configured, we'd route to the
empty fallback and trigger a function invocation.
This restores old behavior of emitting a `.rsc` file for a fully static
route. This information technically also exists in the `.segments`
directory, but it's split into parts, and it's now routed to unless
explicitly done so via the `next-router-segment-prefetch` header. In
addition to emitting the route, this also ensures we set
`prefetchDataRoute` to point to this. This is how the Vercel adapter
knows the file to serve.
An e2e regression test now asserts that `prefetch={false}` navigation
does not wait for a dynamic render. The deploy test will be unblocked
once vercel/vercel#14770 lands.
adriancooney
pushed a commit
that referenced
this pull request
Jan 30, 2026
In legacy versions of PPR, the `prefetchDataRoute` entries would be
populated with `.prefetch.rsc` values containing static RSC payloads.
This regressed in cache components, and the only static RSC payloads
were in the `.segments` directory. However, when Next.js triggers a
regular RSC request (non-prefetch), either because the prefetch hadn't
completed yet or `prefetch={false}` was configured, we'd route to the
empty fallback and trigger a function invocation.
Normally just setting `prefetchDataRoute` in Next.js would have been
sufficient, but with Cache Components, all `.rsc` outputs contain both a
`prefetchDataRoute` and a `dataRoute`. Prior to this change, the builder
would have created a fallback file containing the payload specified by
`prefetchDataRoute`, but in the PPR dynamic branch it was overwriting
that entry with a “dynamic RSC” prerender that has no fallback, which
effectively turned the static `.rsc` into an empty fallback on Vercel.
Without this, the new Next signal is ignored and static navigations
still trigger dynamic renders on Vercel.
adriancooney
pushed a commit
that referenced
this pull request
Jan 30, 2026
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@50.9.4 ### Patch Changes - Updated dependencies \[[`c0a87e350e67b67e1b8a3610cde16a7d86f931fd`](c0a87e3), [`1bc969a200180c5828212c43861c7548dbd3e51c`](1bc969a)]: - @vercel/next@4.15.19 ## @vercel/next@4.15.19 ### Patch Changes - Revert "[next] Remove 404.html prerenders from functions" ([#14793](#14793)) - ensure static .rsc outputs are served as fallbacks ([#14770](#14770)) Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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
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.
In legacy versions of PPR, the
prefetchDataRouteentries would be populated with.prefetch.rscvalues containing static RSC payloads. This regressed in cache components, and the only static RSC payloads were in the.segmentsdirectory. However, when Next.js triggers a regular RSC request (non-prefetch), either because the prefetch hadn't completed yet orprefetch={false}was configured, we'd route to the empty fallback and trigger a function invocation.Normally just setting
prefetchDataRoutein Next.js would have been sufficient, but with Cache Components, all.rscoutputs contain both aprefetchDataRouteand adataRoute. Prior to this change, the builder would have created a fallback file containing the payload specified byprefetchDataRoute, but in the PPR dynamic branch it was overwriting that entry with a “dynamic RSC” prerender that has no fallback, which effectively turned the static.rscinto an empty fallback on Vercel. Without this, the new Next signal is ignored and static navigations still trigger dynamic renders on Vercel.