diff --git a/packages/scheduler/forks/SchedulerFeatureFlags.www.js b/packages/scheduler/forks/SchedulerFeatureFlags.www.js new file mode 100644 index 0000000000000..5686fafa091f2 --- /dev/null +++ b/packages/scheduler/forks/SchedulerFeatureFlags.www.js @@ -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; diff --git a/packages/scheduler/src/Scheduler.js b/packages/scheduler/src/Scheduler.js index ee34cd297e5f7..480ec81c42ed3 100644 --- a/packages/scheduler/src/Scheduler.js +++ b/packages/scheduler/src/Scheduler.js @@ -8,7 +8,7 @@ /* eslint-disable no-var */ -import {enableSchedulerDebugging} from 'shared/ReactFeatureFlags'; +import {enableSchedulerDebugging} from './SchedulerFeatureFlags'; // TODO: Use symbols? var ImmediatePriority = 1; diff --git a/packages/scheduler/src/SchedulerFeatureFlags.js b/packages/scheduler/src/SchedulerFeatureFlags.js new file mode 100644 index 0000000000000..fb60a6b873afc --- /dev/null +++ b/packages/scheduler/src/SchedulerFeatureFlags.js @@ -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; diff --git a/scripts/rollup/forks.js b/scripts/rollup/forks.js index 5ea01f96a9c49..d64e9e53288d8 100644 --- a/scripts/rollup/forks.js +++ b/scripts/rollup/forks.js @@ -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) {