@@ -47,6 +47,9 @@ const shouldUseSourceMap = process.env.GENERATE_SOURCEMAP !== 'false';
47
47
const webpackDevClientEntry = require . resolve (
48
48
'react-dev-utils/webpackHotDevClient'
49
49
) ;
50
+ const reactRefreshOverlayEntry = require . resolve (
51
+ 'react-dev-utils/refreshOverlayInterop'
52
+ ) ;
50
53
51
54
// Some apps do not need the benefits of saving a web request, so not inlining the chunk
52
55
// makes for a smoother build process.
@@ -335,7 +338,10 @@ module.exports = function (webpackEnv) {
335
338
// To fix this, we prevent you from importing files out of src/ -- if you'd like to,
336
339
// please link the files into your node_modules/ and let module-resolution kick in.
337
340
// Make sure your source files are compiled, as they will not be processed in any way.
338
- new ModuleScopePlugin ( paths . appSrc , [ paths . appPackageJson ] ) ,
341
+ new ModuleScopePlugin ( paths . appSrc , [
342
+ paths . appPackageJson ,
343
+ reactRefreshOverlayEntry ,
344
+ ] ) ,
339
345
] ,
340
346
} ,
341
347
resolveLoader : {
@@ -627,7 +633,7 @@ module.exports = function (webpackEnv) {
627
633
entry : webpackDevClientEntry ,
628
634
// The expected exports are slightly different from what the overlay exports,
629
635
// so an interop is included here to enable feedback on module-level errors.
630
- module : require . resolve ( 'react-dev-utils/refreshOverlayInterop' ) ,
636
+ module : reactRefreshOverlayEntry ,
631
637
// Since we ship a custom dev client and overlay integration,
632
638
// the bundled socket handling logic can be eliminated.
633
639
sockIntegration : false ,
0 commit comments