File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
packages/react-devtools-extensions/src/main Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,7 @@ import {
2424 normalizeUrlIfValid ,
2525} from 'react-devtools-shared/src/utils' ;
2626import { checkConditions } from 'react-devtools-shared/src/devtools/views/Editor/utils' ;
27+ import * as parseHookNames from 'react-devtools-shared/src/hooks/parseHookNames' ;
2728
2829import {
2930 setBrowserSelectionFromReact ,
@@ -40,6 +41,12 @@ import getProfilingFlags from './getProfilingFlags';
4041import debounce from './debounce' ;
4142import './requestAnimationFramePolyfill' ;
4243
44+ const resolvedParseHookNames = Promise . resolve ( parseHookNames ) ;
45+ // DevTools assumes this is a dynamically imported module. Since we outline
46+ // workers in this bundle, we can sync require the module since it's just a thin
47+ // wrapper around calling the worker.
48+ const hookNamesModuleLoaderFunction = ( ) => resolvedParseHookNames ;
49+
4350function createBridge ( ) {
4451 bridge = new Bridge ( {
4552 listen ( fn ) {
@@ -188,12 +195,6 @@ function createBridgeAndStore() {
188195 ) ;
189196 } ;
190197
191- // TODO (Webpack 5) Hopefully we can remove this prop after the Webpack 5 migration.
192- const hookNamesModuleLoaderFunction = ( ) =>
193- import (
194- /* webpackChunkName: 'parseHookNames' */ 'react-devtools-shared/src/hooks/parseHookNames'
195- ) ;
196-
197198 root = createRoot ( document . createElement ( 'div' ) ) ;
198199
199200 render = ( overrideTab = mostRecentOverrideTab ) => {
You can’t perform that action at this time.
0 commit comments