Repository navigation
Defer React loading until fetch dedupe construction - #100401
Merged
Merged
Conversation
Contributor
Tests PassedCommit: dc706e3 |
kassens
marked this pull request as ready for review
October 19, 2026 16:36
kassens
requested review from
eps1lon and
gnoff
and removed request for
eps1lon
October 19, 2026 16:39
eps1lon
reviewed
Oct 20, 2026
kassens
force-pushed
the
kassens/lazy-fetch-react
branch
from
October 20, 2026 15:59
b1edfba to
dc706e3
Compare
Contributor
Author
|
Updated and confirmed in a local build that a pure API route no longer loads react. |
kassens
enabled auto-merge (squash)
October 20, 2026 16:03
eps1lon
approved these changes
Oct 22, 2026
mischnic
pushed a commit
that referenced
this pull request
Oct 23, 2026
) Backports #100467 and #100401 to `releases/lts/active`. #100401 defers React loading in `dedupe-fetch.ts`; it builds on #100467, which separates render validation from dynamic tracking and moves the fetch-patch marker into a standalone module so server bootstrap imports cannot reach React. Backported together since the goal of #100401 is only achieved with the #100467 groundwork. --------- Co-authored-by: Jan Kassens <kassens@vercel.com> Co-authored-by: Claude Code <noreply@anthropic.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.
Summary
Avoid initializing React when the router server and fetch helpers are imported. Load React when constructing the fetch deduplication helper, and share the fetch-patched symbol through a standalone module so the router server can access it without loading the fetch patcher.
Removed the lazy module evaluation unit test following review feedback.
Verification
test/e2e/app-dir/app-fetch-deduping/app-fetch-deduping.test.tsin development with Turbopack and production with webpack.canary(3f51f6e612); confirmed the implementation patches are unchanged. Tests were not rerun for the test deletion.