fix: patch

Tracking https://github.com/pmmmwh/react-refresh-webpack-plugin/pull/804 for the final patch
This commit is contained in:
cha0s 2024-02-20 23:50:09 -06:00
parent 5011763a95
commit 8fed3a3065

View File

@ -47,16 +47,3 @@ index 3e66f1e..d1b1b14 100644
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([