(8/19) Hydrate export dynamic fallbacks on initial load#93559
Draft
feedthejim wants to merge 1 commit intofeedthejim/export-dynamic-fallback-server-boundary-e2efrom
Draft
(8/19) Hydrate export dynamic fallbacks on initial load#93559feedthejim wants to merge 1 commit intofeedthejim/export-dynamic-fallback-server-boundary-e2efrom
feedthejim wants to merge 1 commit intofeedthejim/export-dynamic-fallback-server-boundary-e2efrom
Conversation
Contributor
Failing test suitesCommit: 7631b89 | About building and testing Next.js
Expand output● app dir - prefetching › should immediately render the loading state for a dynamic segment when fetched from higher up in the tree |
9cadbc0 to
85441e6
Compare
e16dd5f to
3fe61af
Compare
85441e6 to
15eedd9
Compare
This was referenced May 7, 2026
This was referenced May 7, 2026
15eedd9 to
b5e30e2
Compare
5754fe7 to
55911a7
Compare
c77c309 to
d01fec2
Compare
55911a7 to
9c747f0
Compare
892f3c5 to
f61bc0a
Compare
f61bc0a to
7631b89
Compare
6618a79 to
4129377
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.
Stack position
Part 8 of 19 in the output export dynamic fallback stack.
Previous PR: #93568 (7/19)
Next PR: #93561 (9/19)
Context
The stack is split so build-time output can land behind
experimental.outputExportDynamicFallbacksbefore the client router behavior is enabled. The target behavior is foroutput: 'export'apps with parameterized App Router routes to emit fallback HTML/RSC artifacts that a later client can resolve for hard loads and soft navigations.This PR scope: Client bootstrap for hard loads of fallback documents.
At this point the build can emit fallback documents and RSC data, but a browser hard-load still lands on
_fallback.html. This PR makes initial load fetch the route-specific fallback payload and render the requested route.What changed
_fallback.htmlinitial loads._fallback.htmldata.createRootfor fallback bootstrap and removes the temporary hidden style after the first commit.window.location.Deliberately not included
__NEXT_EXPORT_ORIGINAL_URLmechanism.Verification
After restacking and autosquashing, I verified the full stack with:
pnpm --filter=next buildpnpm testonly packages/next/src/lib/output-export-dynamic-fallback.test.ts packages/next/src/lib/output-export-fallback-routes.test.ts packages/next/src/export/helpers/output-export-fallback.test.ts packages/next/src/server/request/fallback-params.test.tspnpm testonly packages/next/src/client/output-export-fallback.test.ts packages/next/src/client/components/router-reducer/fetch-server-response.test.ts packages/next/src/client/components/router-reducer/create-initial-router-state.test.ts packages/next/src/client/components/segment-cache/cache.test.ts packages/next/src/client/components/segment-cache/vary-path.test.tspnpm testonly packages/next/src/client/components/router-reducer/compute-changed-path.test.ts packages/next/src/client/flight-data-helpers.test.ts packages/next/src/server/app-render/postponed-state.test.tspnpm test-start-turbo test/e2e/app-dir-export/test/dynamic-fallback-cache-components.test.ts test/e2e/app-dir-export/test/dynamic-fallback-route-shapes-cache-components.test.ts test/e2e/app-dir-export/test/dynamic-fallback-cache-components-basepath.test.ts test/e2e/app-dir-export/test/dynamic-fallback-optimizations-cache-components.test.ts test/e2e/app-dir-export/test/dynamic-fallback-known-params-cache-components.test.ts test/e2e/app-dir-export/test/dynamic-fallback-conflict.test.tspnpm test-start-turbo test/e2e/app-dir/output-export-dynamic-fallbacks/output-export-dynamic-fallbacks.test.ts test/e2e/app-dir-export/test/output-export-server-io.test.ts test/e2e/app-dir-export/test/output-export-server-io-use-cache.test.ts test/e2e/app-dir-export/test/dynamic-fallback-server-params.test.ts