From 8fed3a3065b013b9e247d1a521d97ea839067d2a Mon Sep 17 00:00:00 2001 From: cha0s Date: Tue, 20 Feb 2024 23:50:09 -0600 Subject: [PATCH] fix: patch Tracking https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/804 for the final patch --- ...+react-refresh-webpack-plugin+0.5.11.patch | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/packages/create-app/template/patches/@pmmmwh+react-refresh-webpack-plugin+0.5.11.patch b/packages/create-app/template/patches/@pmmmwh+react-refresh-webpack-plugin+0.5.11.patch index accd443..d3ab532 100644 --- a/packages/create-app/template/patches/@pmmmwh+react-refresh-webpack-plugin+0.5.11.patch +++ b/packages/create-app/template/patches/@pmmmwh+react-refresh-webpack-plugin+0.5.11.patch @@ -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([