Is there a way in webpack watch mode to display on screen the timestamp when webpack last updated the build?
you can add a custom plugin like:
config.plugins.push(function(){
this.plugin('done', function(stats) {
console.log(('\n[' + new Date().toLocaleString() + ']') + ' Begin a new compilation.\n');
});
});
The answer of datou3600 is awesome, but why not to be better?
Adding a little delay:
- The text is placed at the end
- A screen blinks noticeable to an eye
Here is the code:
config.plugins.push(function(){
this.plugin('done', function(stats) {
setTimeout(
() => {
console.log(('\n[' + new Date().toLocaleString() + ']') + ' --- DONE.\n');
},
100
);
});
});
Install webpack-watch-time-plugin.
It displays the time when watcher rebuild happens.