mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
Create separate SchedulerFeatureFlags instead of using ReactFeatureFlags (#14455)
This commit is contained in:
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;
|
||||
@@ -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;
|
||||
@@ -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) {
|
||||
|
||||
Reference in new issue
Block a user