Skip to content

Commit e749b59

Browse files
authored
fix: overlay.module is not working (#41)
1 parent 86650d3 commit e749b59

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

client/reactRefresh.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,15 @@ const RefreshRuntime = require('react-refresh/runtime');
66
function refresh(moduleId, webpackHot) {
77
const currentExports = RefreshUtils.getModuleExports(moduleId);
88
const fn = (exports) => {
9-
RefreshUtils.executeRuntime(exports, moduleId, webpackHot);
9+
var errorOverlay;
10+
if (typeof __react_refresh_error_overlay__ !== 'undefined') {
11+
errorOverlay = __react_refresh_error_overlay__;
12+
}
13+
var testMode;
14+
if (typeof __react_refresh_test__ !== 'undefined') {
15+
testMode = __react_refresh_test__;
16+
}
17+
RefreshUtils.executeRuntime(exports, moduleId, webpackHot, errorOverlay, testMode);
1018
};
1119
if (typeof Promise !== 'undefined' && currentExports instanceof Promise) {
1220
currentExports.then(fn);

0 commit comments

Comments
 (0)