Skip to content

Commit 3287835

Browse files
authored
Merge pull request #214 from the-ress/watch-message
Display message on watch compilation start
2 parents 991d108 + 51a4a8b commit 3287835

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,19 @@ module.exports = function (options, wp, done) {
241241
} else {
242242
handleCompiler(compiler);
243243
}
244+
245+
if (options.watch && !isSilent) {
246+
const watchRunPlugin = compiler.hooks
247+
// Webpack 4
248+
? callback => compiler.hooks.watchRun.tapAsync('WebpackInfo', callback)
249+
// Webpack 2/3
250+
: callback => compiler.plugin('watch-run', callback);
251+
252+
watchRunPlugin((compilation, callback) => {
253+
fancyLog('webpack compilation starting...');
254+
callback();
255+
});
256+
}
244257
});
245258

246259
// If entry point manually specified, trigger that

0 commit comments

Comments
 (0)