Defer React loading until fetch dedupe construction (#100401)
## 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 - Previously validated fetch deduplication and fetch patching unit tests, plus `test/e2e/app-dir/app-fetch-deduping/app-fetch-deduping.test.ts` in development with Turbopack and production with webpack. - Rebased onto `canary` (`3f51f6e6`); confirmed the implementation patches are unchanged. Tests were not rerun for the test deletion. <!-- NEXT_JS_LLM -->
Showing
Please
register
or
sign in
to comment