Skip to content

Commit

Permalink
Fix feature flags react-dom/unstable-new-scheduler (#15309)
Browse files Browse the repository at this point in the history
I forgot to account for the CommonJS builds. (I had this change in
my local checkout but accidentally didn't commit it.)
  • Loading branch information
acdlite authored Apr 3, 2019
1 parent 92a1d8f commit 3a44cce
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
1 change: 1 addition & 0 deletions scripts/rollup/bundles.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const bundles = [
FB_WWW_PROFILING,
NODE_DEV,
NODE_PROD,
NODE_PROFILING,
],
moduleType: RENDERER,
entry: 'react-dom/unstable-new-scheduler',
Expand Down
19 changes: 16 additions & 3 deletions scripts/rollup/forks.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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) {
Expand Down

0 comments on commit 3a44cce

Please sign in to comment.