Skip to content

Commit ba3fc17

Browse files
authored
A new version of run-script-webpack-plugin was released, which contains an autoRestart flag, which should be set to false for HMR.
1 parent 11a0f28 commit ba3fc17

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

content/recipes/hot-reload.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ module.exports = function (options, webpack) {
4141
new webpack.WatchIgnorePlugin({
4242
paths: [/\.js$/, /\.d\.ts$/],
4343
}),
44-
new RunScriptWebpackPlugin({ name: options.output.filename }),
44+
new RunScriptWebpackPlugin({ name: options.output.filename, autoRestart: false }),
4545
],
4646
};
4747
};
@@ -129,7 +129,7 @@ module.exports = {
129129
},
130130
plugins: [
131131
new webpack.HotModuleReplacementPlugin(),
132-
new RunScriptWebpackPlugin({ name: 'server.js' }),
132+
new RunScriptWebpackPlugin({ name: 'server.js', autoRestart: false }),
133133
],
134134
output: {
135135
path: path.join(__dirname, 'dist'),

0 commit comments

Comments
 (0)