(4/9) Reject request-only APIs in output: 'export' fallback pages#93033
Draft
feedthejim wants to merge 4 commits intofeedthejim/export-fallback-routing-reviewfrom
Draft
Conversation
Contributor
|
All broken links are now fixed, thank you! |
This was referenced Apr 20, 2026
This was referenced Apr 20, 2026
output: 'export' fallback pages
50f798b to
e9cbf5d
Compare
0df19c0 to
ad26827
Compare
fb4053d to
e1fd539
Compare
d836946 to
919c094
Compare
5331779 to
9fc3ed0
Compare
919c094 to
5486198
Compare
9fc3ed0 to
a1349fb
Compare
5486198 to
a6b367f
Compare
a1349fb to
381fbb6
Compare
a6b367f to
b1a1b95
Compare
381fbb6 to
8b65b6b
Compare
8b65b6b to
a24b748
Compare
b1a1b95 to
4f55188
Compare
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.
Context
Exported fallback pages still render at build time, so values that only exist per request cannot work there.
What This PR Does
headers(),cookies(),connection(), andsearchParamsin export fallback renderingWhy This Is Separate
This isolates the policy around request-derived values. Reviewers can look at that rule by itself before the next PR handles the separate question of time, randomness, and
use cache.Not In This PR
Date.now()andMath.random()Validation
pnpm --filter=next buildNEXT_SKIP_ISOLATE=1 NEXT_TEST_MODE=start pnpm testheadless test/e2e/app-dir-export/test/dynamic-fallback-server-params.test.ts test/e2e/app-dir-export/test/dynamic-fallback-server-params-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-connection.test.ts test/e2e/app-dir-export/test/output-export-server-connection-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-cookies.test.ts test/e2e/app-dir-export/test/output-export-server-cookies-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-headers.test.ts test/e2e/app-dir-export/test/output-export-server-headers-suspense.test.ts test/e2e/app-dir-export/test/output-export-server-search-params.test.ts test/e2e/app-dir-export/test/output-export-server-search-params-suspense.test.tsStack
Part 4 of 9 in the output-export fallback stack.
(1/9) Add the basic runtime for app-router fallbacks inoutput: 'export'``(2/9) Coveroutput: 'export'fallbacks across app-router route shapes(3/9) Prefer the most specific route for overlapping export fallbacks(4/9) Reject request-only APIs inoutput: 'export'fallback pages(this PR)(5/9) Define sync IO rules foroutput: 'export'fallback pages(6/9) Hide the export fallback bootstrap document on hard loads(7/9) Prefetch and dedupe export fallback data requests(8/9) Reuse learned export fallback paths after hydration(9/9) Use appnot-foundwhen no export fallback route matches