Skip to content

Commit

Permalink
fix increasing delay with multiStep HMR
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Nov 23, 2017
1 parent 885e9ee commit 991ec20
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/HotModuleReplacementPlugin.js
Expand Up @@ -25,6 +25,11 @@ module.exports = class HotModuleReplacementPlugin {
const requestTimeout = this.requestTimeout;
const hotUpdateChunkFilename = compiler.options.output.hotUpdateChunkFilename;
const hotUpdateMainFilename = compiler.options.output.hotUpdateMainFilename;
compiler.plugin("additional-pass", callback => {
if(multiStep)
return setTimeout(callback, fullBuildTimeout);
return callback();
});
compiler.plugin("compilation", (compilation, params) => {
const hotUpdateChunkTemplate = compilation.hotUpdateChunkTemplate;
if(!hotUpdateChunkTemplate) return;
Expand Down Expand Up @@ -88,11 +93,6 @@ module.exports = class HotModuleReplacementPlugin {
if(multiStep && !recompilation && !initialPass)
return true;
});
compiler.plugin("additional-pass", callback => {
if(multiStep)
return setTimeout(callback, fullBuildTimeout);
return callback();
});
compilation.plugin("additional-chunk-assets", function() {
const records = this.records;
if(records.hash === this.hash) return;
Expand Down

0 comments on commit 991ec20

Please sign in to comment.