diff --git a/packages/shared/ReactFeatureFlags.js b/packages/shared/ReactFeatureFlags.js index 43cbe66ea47a1..3ed8f45f9a433 100644 --- a/packages/shared/ReactFeatureFlags.js +++ b/packages/shared/ReactFeatureFlags.js @@ -110,7 +110,7 @@ export const enableUseEffectEventHook = __EXPERIMENTAL__; // Test in www before enabling in open source. // Enables DOM-server to stream its instruction set as data-attributes // (handled with an MutationObserver) instead of inline-scripts -export const enableFizzExternalRuntime = true; +export const enableFizzExternalRuntime = __EXPERIMENTAL__; export const alwaysThrottleRetries = true; diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index b5755725124aa..20af2f1fa1205 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -328,7 +328,7 @@ const bundles = [ /******* React DOM Fizz Server External Runtime *******/ { - bundleTypes: [BROWSER_SCRIPT], + bundleTypes: __EXPERIMENTAL__ ? [BROWSER_SCRIPT] : [], moduleType: RENDERER, entry: 'react-dom/unstable_server-external-runtime', outputPath: 'unstable_server-external-runtime.js', diff --git a/scripts/rollup/packaging.js b/scripts/rollup/packaging.js index 0c7123fae6d13..b3b1a7cf9add1 100644 --- a/scripts/rollup/packaging.js +++ b/scripts/rollup/packaging.js @@ -235,7 +235,14 @@ function filterOutEntrypoints(name) { // Let's remove it. files.splice(i, 1); i--; - unlinkSync(`build/node_modules/${name}/${filename}`); + try { + unlinkSync(`build/node_modules/${name}/${filename}`); + } catch (err) { + // If the file doesn't exist we can just move on. Otherwise throw the halt the build + if (err.code !== 'ENOENT') { + throw err; + } + } changed = true; // Remove it from the exports field too if it exists. if (exportsJSON) {