Create separate SchedulerFeatureFlags instead of using ReactFeatureFlags (#14455)
Andrew Clark committed
Dec 17, 2018 at 17:55 UTC
653bc582f94e955b175d42836479ee8b9eeeeeaf
4 files changed
+31
-1
packages/scheduler/forks/SchedulerFeatureFlags.www.js
new
+9
@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+export const enableSchedulerDebugging = true;
packages/scheduler/src/Scheduler.js
+1
-1
@@ -8,7 +8,7 @@
8
9
/* eslint-disable no-var */
10
11
-import {enableSchedulerDebugging} from 'shared/ReactFeatureFlags';
11
+import {enableSchedulerDebugging} from './SchedulerFeatureFlags';
12
13
// TODO: Use symbols?
14
var ImmediatePriority = 1;
packages/scheduler/src/SchedulerFeatureFlags.js
new
+9
@@ -0,0 +1,9 @@
1
+/**
2
+ * Copyright (c) Facebook, Inc. and its affiliates.
3
+ *
4
+ * This source code is licensed under the MIT license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ *
7
+ */
8
+
9
+export const enableSchedulerDebugging = false;
scripts/rollup/forks.js
+12
@@ -157,6 +157,18 @@ const forks = Object.freeze({
157
}
158
},
159
160
+ 'scheduler/src/SchedulerFeatureFlags': (bundleType, entry, dependencies) => {
161
+ if (
162
+ entry === 'scheduler' &&
163
+ (bundleType === FB_WWW_DEV ||
164
+ bundleType === FB_WWW_PROD ||
165
+ bundleType === FB_WWW_PROFILING)
166
+ ) {
167
+ return 'scheduler/forks/SchedulerFeatureFlags.www.js';
168
+ }
169
+ return 'scheduler/src/SchedulerFeatureFlags';
170
+ },
171
+
172
// This logic is forked on www to fork the formatting function.
173
'shared/invariant': (bundleType, entry) => {
174
switch (bundleType) {