Skip to content

Commit

Permalink
fix: correctly detect hmr plugin in run and watch modes (#130)
Browse files Browse the repository at this point in the history
  • Loading branch information
pmmmwh authored Jun 29, 2020
1 parent fbee96a commit 4d169c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ class ReactRefreshPlugin {
const providePlugin = new ProvidePlugin(providedModules);
providePlugin.apply(compiler);

compiler.hooks.beforeRun.tap(this.constructor.name, (compiler) => {
compiler.hooks.beforeCompile.tap(this.constructor.name, () => {
// Check for existence of HotModuleReplacementPlugin in the plugin list
// It is the foundation to this plugin working correctly
if (
Expand Down

0 comments on commit 4d169c4

Please sign in to comment.