Skip to content

Commit dfb03e8

Browse files
committed
[Flight][Float] Preinitialize module imports during SSR (#27314)
Currently when we SSR a Flight response we do not emit any resources for module imports. This means that when the client hydrates it won't have already loaded the necessary scripts to satisfy the Imports defined in the Flight payload which will lead to a delay in hydration completing. This change updates `react-server-dom-webpack` and `react-server-dom-esm` to emit async script tags in the head when we encounter a modules in the flight response. To support this we need some additional server configuration. We need to know the path prefix for chunk loading and whether the chunks will load with CORS or not (and if so with what configuration). DiffTrain build for commit 701ac2e.
1 parent 4c54509 commit dfb03e8

File tree

7 files changed

+9
-9
lines changed

7 files changed

+9
-9
lines changed

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23985,7 +23985,7 @@ function createFiberRoot(
2398523985
return root;
2398623986
}
2398723987

23988-
var ReactVersion = "18.3.0-canary-49eba0193-20230926";
23988+
var ReactVersion = "18.3.0-canary-701ac2e57-20230927";
2398923989

2399023990
// Might add PROFILE later.
2399123991

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-prod.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8620,7 +8620,7 @@ var devToolsConfig$jscomp$inline_1027 = {
86208620
throw Error("TestRenderer does not support findFiberByHostInstance()");
86218621
},
86228622
bundleType: 0,
8623-
version: "18.3.0-canary-49eba0193-20230926",
8623+
version: "18.3.0-canary-701ac2e57-20230927",
86248624
rendererPackageName: "react-test-renderer"
86258625
};
86268626
var internals$jscomp$inline_1226 = {
@@ -8651,7 +8651,7 @@ var internals$jscomp$inline_1226 = {
86518651
scheduleRoot: null,
86528652
setRefreshHandler: null,
86538653
getCurrentFiber: null,
8654-
reconcilerVersion: "18.3.0-canary-49eba0193-20230926"
8654+
reconcilerVersion: "18.3.0-canary-701ac2e57-20230927"
86558655
};
86568656
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
86578657
var hook$jscomp$inline_1227 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react-test-renderer/cjs/ReactTestRenderer-profiling.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9046,7 +9046,7 @@ var devToolsConfig$jscomp$inline_1069 = {
90469046
throw Error("TestRenderer does not support findFiberByHostInstance()");
90479047
},
90489048
bundleType: 0,
9049-
version: "18.3.0-canary-49eba0193-20230926",
9049+
version: "18.3.0-canary-701ac2e57-20230927",
90509050
rendererPackageName: "react-test-renderer"
90519051
};
90529052
var internals$jscomp$inline_1267 = {
@@ -9077,7 +9077,7 @@ var internals$jscomp$inline_1267 = {
90779077
scheduleRoot: null,
90789078
setRefreshHandler: null,
90799079
getCurrentFiber: null,
9080-
reconcilerVersion: "18.3.0-canary-49eba0193-20230926"
9080+
reconcilerVersion: "18.3.0-canary-701ac2e57-20230927"
90819081
};
90829082
if ("undefined" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__) {
90839083
var hook$jscomp$inline_1268 = __REACT_DEVTOOLS_GLOBAL_HOOK__;

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-dev.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ if (
2727
}
2828
"use strict";
2929

30-
var ReactVersion = "18.3.0-canary-49eba0193-20230926";
30+
var ReactVersion = "18.3.0-canary-701ac2e57-20230927";
3131

3232
// ATTENTION
3333
// When adding new symbols to this file,

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-prod.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,4 +616,4 @@ exports.useSyncExternalStore = function (
616616
exports.useTransition = function () {
617617
return ReactCurrentDispatcher.current.useTransition();
618618
};
619-
exports.version = "18.3.0-canary-49eba0193-20230926";
619+
exports.version = "18.3.0-canary-701ac2e57-20230927";

compiled-rn/facebook-fbsource/xplat/js/RKJSModules/vendor/react/cjs/React-profiling.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -619,7 +619,7 @@ exports.useSyncExternalStore = function (
619619
exports.useTransition = function () {
620620
return ReactCurrentDispatcher.current.useTransition();
621621
};
622-
exports.version = "18.3.0-canary-49eba0193-20230926";
622+
exports.version = "18.3.0-canary-701ac2e57-20230927";
623623

624624
/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */
625625
if (
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
49eba01930e9e1f331b34967fca65d5a0ba62846
1+
701ac2e57290f913502c6012c15e815f412f84b7

0 commit comments

Comments
 (0)