Skip to content

Commit 72da631

Browse files
committed
The external runtime is not vetted for stability yet. We should stop publishing it with our stable build
1 parent 7f93cb4 commit 72da631

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

packages/react-dom/src/__tests__/ReactDOMFizzServer-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -610,7 +610,7 @@ describe('ReactDOMFizzServer', () => {
610610
Array.from(container.getElementsByTagName('script')).filter(
611611
node => node.getAttribute('nonce') === CSPnonce,
612612
).length,
613-
).toEqual(6);
613+
).toEqual(gate(f => f.enableFizzExternalRuntime) ? 6 : 5);
614614

615615
await act(() => {
616616
resolve({default: Text});

packages/shared/ReactFeatureFlags.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ export const enableUseEffectEventHook = __EXPERIMENTAL__;
110110
// Test in www before enabling in open source.
111111
// Enables DOM-server to stream its instruction set as data-attributes
112112
// (handled with an MutationObserver) instead of inline-scripts
113-
export const enableFizzExternalRuntime = true;
113+
export const enableFizzExternalRuntime = __EXPERIMENTAL__;
114114

115115
export const alwaysThrottleRetries = true;
116116

scripts/rollup/bundles.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ const bundles = [
328328

329329
/******* React DOM Fizz Server External Runtime *******/
330330
{
331-
bundleTypes: [BROWSER_SCRIPT],
331+
bundleTypes: __EXPERIMENTAL__ ? [BROWSER_SCRIPT] : [],
332332
moduleType: RENDERER,
333333
entry: 'react-dom/unstable_server-external-runtime',
334334
outputPath: 'unstable_server-external-runtime.js',

scripts/rollup/packaging.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,14 @@ function filterOutEntrypoints(name) {
235235
// Let's remove it.
236236
files.splice(i, 1);
237237
i--;
238-
unlinkSync(`build/node_modules/${name}/${filename}`);
238+
try {
239+
unlinkSync(`build/node_modules/${name}/${filename}`);
240+
} catch (err) {
241+
// If the file doesn't exist we can just move on. Otherwise throw the halt the build
242+
if (err.code !== 'ENOENT') {
243+
throw err;
244+
}
245+
}
239246
changed = true;
240247
// Remove it from the exports field too if it exists.
241248
if (exportsJSON) {

0 commit comments

Comments
 (0)