Skip to content

Commit

Permalink
fix: use correct DefinePlugin in plugin-react-refresh (#4794)
Browse files Browse the repository at this point in the history
fix: use correct DefinePlugin in react refresh
  • Loading branch information
ahabhgk authored Nov 28, 2023
1 parent aad0f68 commit 6490a91
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions packages/rspack-plugin-react-refresh/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import path from "path";
import type { Compiler } from "@rspack/core";
import { DefinePlugin } from "@rspack/core";
import { normalizeOptions, type PluginOptions } from "./options";

export type { PluginOptions };
Expand Down Expand Up @@ -68,7 +67,7 @@ class ReactRefreshRspackPlugin {
)
)
};
new DefinePlugin(definedModules).apply(compiler);
new compiler.webpack.DefinePlugin(definedModules).apply(compiler);

const refreshPath = path.dirname(require.resolve("react-refresh"));
compiler.options.resolve.alias = {
Expand Down

0 comments on commit 6490a91

Please sign in to comment.