Skip to content

Commit

Permalink
display message on watch compilation start
Browse files Browse the repository at this point in the history
  • Loading branch information
the-ress committed Feb 15, 2019
1 parent fa9a5b2 commit 51a4a8b
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,19 @@ module.exports = function (options, wp, done) {
} else {
handleCompiler(compiler);
}

if (options.watch && !isSilent) {
const watchRunPlugin = compiler.hooks
// Webpack 4
? callback => compiler.hooks.watchRun.tapAsync('WebpackInfo', callback)
// Webpack 2/3
: callback => compiler.plugin('watch-run', callback);

watchRunPlugin((compilation, callback) => {
fancyLog('webpack compilation starting...');
callback();
});
}
});

// If entry point manually specified, trigger that
Expand Down

0 comments on commit 51a4a8b

Please sign in to comment.