Skip to content

Commit 3a44cce

Browse files
authored
Fix feature flags react-dom/unstable-new-scheduler (#15309)
I forgot to account for the CommonJS builds. (I had this change in my local checkout but accidentally didn't commit it.)
1 parent 92a1d8f commit 3a44cce

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

scripts/rollup/bundles.js

+1
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ const bundles = [
118118
FB_WWW_PROFILING,
119119
NODE_DEV,
120120
NODE_PROD,
121+
NODE_PROFILING,
121122
],
122123
moduleType: RENDERER,
123124
entry: 'react-dom/unstable-new-scheduler',

scripts/rollup/forks.js

+16-3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ const inlinedHostConfigs = require('../shared/inlinedHostConfigs');
77
const UMD_DEV = bundleTypes.UMD_DEV;
88
const UMD_PROD = bundleTypes.UMD_PROD;
99
const UMD_PROFILING = bundleTypes.UMD_PROFILING;
10+
const NODE_DEV = bundleTypes.NODE_DEV;
11+
const NODE_PROD = bundleTypes.NODE_PROD;
12+
const NODE_PROFILING = bundleTypes.NODE_PROFILING;
1013
const FB_WWW_DEV = bundleTypes.FB_WWW_DEV;
1114
const FB_WWW_PROD = bundleTypes.FB_WWW_PROD;
1215
const FB_WWW_PROFILING = bundleTypes.FB_WWW_PROFILING;
@@ -69,10 +72,20 @@ const forks = Object.freeze({
6972
'shared/ReactFeatureFlags': (bundleType, entry) => {
7073
switch (entry) {
7174
case 'react-dom/unstable-new-scheduler': {
72-
if (entry === 'react-dom/unstable-new-scheduler') {
73-
return 'shared/forks/ReactFeatureFlags.www-new-scheduler.js';
75+
switch (bundleType) {
76+
case FB_WWW_DEV:
77+
case FB_WWW_PROD:
78+
case FB_WWW_PROFILING:
79+
return 'shared/forks/ReactFeatureFlags.www-new-scheduler.js';
80+
case NODE_DEV:
81+
case NODE_PROD:
82+
case NODE_PROFILING:
83+
return 'shared/forks/ReactFeatureFlags.new-scheduler.js';
84+
default:
85+
throw Error(
86+
`Unexpected entry (${entry}) and bundleType (${bundleType})`
87+
);
7488
}
75-
return null;
7689
}
7790
case 'react-native-renderer':
7891
switch (bundleType) {

0 commit comments

Comments
 (0)