diff --git a/scripts/rollup/bundles.js b/scripts/rollup/bundles.js index 3ba276130135f..e2e59d2c4092e 100644 --- a/scripts/rollup/bundles.js +++ b/scripts/rollup/bundles.js @@ -118,6 +118,7 @@ const bundles = [ FB_WWW_PROFILING, NODE_DEV, NODE_PROD, + NODE_PROFILING, ], moduleType: RENDERER, entry: 'react-dom/unstable-new-scheduler', diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index 41d0f9bce6cd9..45c1fd411f178 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -7,6 +7,9 @@ const inlinedHostConfigs = require('../shared/inlinedHostConfigs'); const UMD_DEV = bundleTypes.UMD_DEV; const UMD_PROD = bundleTypes.UMD_PROD; const UMD_PROFILING = bundleTypes.UMD_PROFILING; +const NODE_DEV = bundleTypes.NODE_DEV; +const NODE_PROD = bundleTypes.NODE_PROD; +const NODE_PROFILING = bundleTypes.NODE_PROFILING; const FB_WWW_DEV = bundleTypes.FB_WWW_DEV; const FB_WWW_PROD = bundleTypes.FB_WWW_PROD; const FB_WWW_PROFILING = bundleTypes.FB_WWW_PROFILING; @@ -69,10 +72,20 @@ const forks = Object.freeze({ 'shared/ReactFeatureFlags': (bundleType, entry) => { switch (entry) { case 'react-dom/unstable-new-scheduler': { - if (entry === 'react-dom/unstable-new-scheduler') { - return 'shared/forks/ReactFeatureFlags.www-new-scheduler.js'; + switch (bundleType) { + case FB_WWW_DEV: + case FB_WWW_PROD: + case FB_WWW_PROFILING: + return 'shared/forks/ReactFeatureFlags.www-new-scheduler.js'; + case NODE_DEV: + case NODE_PROD: + case NODE_PROFILING: + return 'shared/forks/ReactFeatureFlags.new-scheduler.js'; + default: + throw Error( + `Unexpected entry (${entry}) and bundleType (${bundleType})` + ); } - return null; } case 'react-native-renderer': switch (bundleType) {