fix: patch
Tracking https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/804 for the final patch
This commit is contained in:
parent
5011763a95
commit
8fed3a3065
|
@ -26,7 +26,7 @@ index 3e66f1e..d1b1b14 100644
|
|||
+ // if (typeof refreshOverlay !== 'undefined' && refreshOverlay) {
|
||||
+ // refreshOverlay.handleRuntimeError(error);
|
||||
+ // }
|
||||
|
||||
|
||||
- if (typeof isTest !== 'undefined' && isTest) {
|
||||
- if (window.onHotAcceptError) {
|
||||
- window.onHotAcceptError(error.message);
|
||||
|
@ -37,26 +37,13 @@ index 3e66f1e..d1b1b14 100644
|
|||
+ // window.onHotAcceptError(error.message);
|
||||
+ // }
|
||||
+ // }
|
||||
|
||||
|
||||
- __webpack_require__.c[moduleId].hot.accept(hotErrorHandler);
|
||||
- }
|
||||
- );
|
||||
+ // __webpack_require__.c[moduleId].hot.accept(hotErrorHandler);
|
||||
+ // }
|
||||
+ // );
|
||||
|
||||
|
||||
if (isHotUpdate) {
|
||||
if (
|
||||
diff --git a/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/makeRefreshRuntimeModule.js b/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/makeRefreshRuntimeModule.js
|
||||
index 4e25c4b..1cdac82 100644
|
||||
--- a/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/makeRefreshRuntimeModule.js
|
||||
+++ b/node_modules/@pmmmwh/react-refresh-webpack-plugin/lib/utils/makeRefreshRuntimeModule.js
|
||||
@@ -32,7 +32,7 @@ function makeRefreshRuntimeModule(webpack) {
|
||||
`${refreshGlobal}.setup(options.id);`,
|
||||
'try {',
|
||||
webpack.Template.indent(
|
||||
- 'originalFactory.call(this, moduleObject, moduleExports, webpackRequire);'
|
||||
+ 'originalFactory && originalFactory.call(this, moduleObject, moduleExports, webpackRequire);'
|
||||
),
|
||||
'} finally {',
|
||||
webpack.Template.indent([
|
||||
|
|
Loading…
Reference in New Issue
Block a user