Use closure instead of doneCompiling() method. Fixes #1717

This commit is contained in:
QWp6t
2016-09-11 18:47:46 -07:00
parent ce82d1a25d
commit c96905b075

View File

@@ -21,15 +21,14 @@ module.exports = class {
return;
}
this.compiler = compiler;
compiler.plugin('done', this.doneCompiling);
}
doneCompiling() {
if (!this.watcher) {
this.watcher = browserSync.create();
this.compiler.plugin('compilation', () => this.watcher.notify('Rebuilding...'));
this.start();
}
// Optionally add logic for this.watcher.reload()
compiler.plugin('done', () => {
if (!this.watcher) {
this.watcher = browserSync.create();
compiler.plugin('compilation', () => this.watcher.notify('Rebuilding...'));
this.start();
}
// Optionally add logic for this.watcher.reload()
});
}
start() {
const watcherConfig = mergeWithConcat({