For anyone working iteratively using webpack --watch
: First do npm install node-notifier --save-dev
and then put this into webpack.config.js
:
const notifier = require('node-notifier');
...
plugins: [
function() {
this.plugin("done", function(stats) {
if (stats.hasErrors()) {
notifier.notify('Error');
} else {