Create separate SchedulerFeatureFlags instead of using ReactFeatureFlags (#14455)

This commit is contained in:
Andrew Clark authored and GitHub committed 2018-12-17 17:55:34 -08:00
1 parent 8bfef0da55
commit 653bc582f9
4 files changed
+31 -1

No files matched your search

@@ -0,0 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
export const enableSchedulerDebugging = true;
+1 -1
View File
@@ -8,7 +8,7 @@
/* eslint-disable no-var */
import {enableSchedulerDebugging} from 'shared/ReactFeatureFlags';
import {enableSchedulerDebugging} from './SchedulerFeatureFlags';
// TODO: Use symbols?
var ImmediatePriority = 1;
@@ -0,0 +1,9 @@
/**
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
*/
export const enableSchedulerDebugging = false;
+12
View File
@@ -157,6 +157,18 @@ const forks = Object.freeze({
}
},
'scheduler/src/SchedulerFeatureFlags': (bundleType, entry, dependencies) => {
if (
entry === 'scheduler' &&
(bundleType === FB_WWW_DEV ||
bundleType === FB_WWW_PROD ||
bundleType === FB_WWW_PROFILING)
) {
return 'scheduler/forks/SchedulerFeatureFlags.www.js';
}
return 'scheduler/src/SchedulerFeatureFlags';
},
// This logic is forked on www to fork the formatting function.
'shared/invariant': (bundleType, entry) => {
switch (bundleType) {