Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix feature flags react-dom/unstable-new-scheduler #15309

Merged
merged 1 commit into from
Apr 3, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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