Is there a way in webpack view mode to display the timestamp on the screen when webpack last updated the assembly?

Sometimes when starting webpack in view and editing source files, I’m not sure if webpack has packaged my changes or not.

Is there a way to print the timestamp on the console every time webpack updates the package?

+4
source share
2 answers

you can add a custom plugin, for example:

config.plugins.push(function(){
    this.plugin('done', function(stats) {
        console.log(('\n[' + new Date().toLocaleString() + ']') + ' Begin a new compilation.\n');
    });
});
+4
source

Install webpack-watch-time-plugin .

Displays the recovery time of the observer recovery.

Screenshot

+3
source

Source: https://habr.com/ru/post/1667051/


All Articles