Use closure instead of doneCompiling() method. Fixes #1717
This commit is contained in:
@@ -21,15 +21,14 @@ module.exports = class {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.compiler = compiler;
|
this.compiler = compiler;
|
||||||
compiler.plugin('done', this.doneCompiling);
|
compiler.plugin('done', () => {
|
||||||
}
|
if (!this.watcher) {
|
||||||
doneCompiling() {
|
this.watcher = browserSync.create();
|
||||||
if (!this.watcher) {
|
compiler.plugin('compilation', () => this.watcher.notify('Rebuilding...'));
|
||||||
this.watcher = browserSync.create();
|
this.start();
|
||||||
this.compiler.plugin('compilation', () => this.watcher.notify('Rebuilding...'));
|
}
|
||||||
this.start();
|
// Optionally add logic for this.watcher.reload()
|
||||||
}
|
});
|
||||||
// Optionally add logic for this.watcher.reload()
|
|
||||||
}
|
}
|
||||||
start() {
|
start() {
|
||||||
const watcherConfig = mergeWithConcat({
|
const watcherConfig = mergeWithConcat({
|
||||||
|
|||||||
Reference in New Issue
Block a user