@rspack/plugin-react-refresh
Advanced tools
Comparing version 0.3.6 to 0.3.7
{ | ||
"name": "@rspack/plugin-react-refresh", | ||
"version": "0.3.6", | ||
"version": "0.3.7", | ||
"license": "MIT", | ||
@@ -32,4 +32,4 @@ "description": "React refresh plugin for rspack", | ||
"react-refresh": "0.14.0", | ||
"@rspack/core": "0.3.6", | ||
"@rspack/plugin-react-refresh": "0.3.6" | ||
"@rspack/core": "0.3.7", | ||
"@rspack/plugin-react-refresh": "0.3.7" | ||
}, | ||
@@ -36,0 +36,0 @@ "peerDependencies": { |
@@ -47,2 +47,6 @@ const path = require("path"); | ||
} | ||
/** | ||
* @param {import("@rspack/core").Compiler} compiler | ||
*/ | ||
apply(compiler) { | ||
@@ -63,2 +67,8 @@ new compiler.webpack.EntryPlugin(compiler.context, reactRefreshEntryPath, { | ||
}); | ||
const refreshPath = path.dirname(require.resolve("react-refresh")); | ||
compiler.options.resolve.alias = { | ||
"react-refresh": refreshPath, | ||
...compiler.options.resolve.alias | ||
}; | ||
} | ||
@@ -65,0 +75,0 @@ }; |
8716
182