From 4190a34588ec0b05aac6f050ec656ec4b3f005d7 Mon Sep 17 00:00:00 2001 From: Brian Vaughn Date: Tue, 23 Feb 2021 12:15:36 -0500 Subject: [PATCH] Update scheduling profiler Webpack config (#20867) Use the pre-built scheduler (which includes a check for 'window' being defined in order to load the right scheduler implementation) rather than just directly importing a version of the scheduler that relies on window. Since the scheduling profiler's code runs partially in a web worker, it can't rely on window. --- packages/react-devtools-scheduling-profiler/webpack.config.js | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/react-devtools-scheduling-profiler/webpack.config.js b/packages/react-devtools-scheduling-profiler/webpack.config.js index 9a167dda3f..e30d4fda13 100644 --- a/packages/react-devtools-scheduling-profiler/webpack.config.js +++ b/packages/react-devtools-scheduling-profiler/webpack.config.js @@ -49,6 +49,7 @@ const config = { react: resolve(builtModulesDir, 'react'), 'react-dom': resolve(builtModulesDir, 'react-dom'), 'react-refresh': resolve(builtModulesDir, 'react-refresh'), + scheduler: resolve(builtModulesDir, 'scheduler'), }, }, plugins: [