images should be recompiled on compiler done event
This commit is contained in:
@@ -71,6 +71,7 @@ module.exports = class {
|
|||||||
this.globOptions.nodir = true;
|
this.globOptions.nodir = true;
|
||||||
this.manifest = options.manifest || {};
|
this.manifest = options.manifest || {};
|
||||||
this.files = [];
|
this.files = [];
|
||||||
|
this.started = false;
|
||||||
}
|
}
|
||||||
apply(compiler) {
|
apply(compiler) {
|
||||||
if (this.disable) {
|
if (this.disable) {
|
||||||
@@ -78,8 +79,12 @@ module.exports = class {
|
|||||||
}
|
}
|
||||||
this.compiler = compiler;
|
this.compiler = compiler;
|
||||||
this.resolveWorkingDirectory();
|
this.resolveWorkingDirectory();
|
||||||
|
if (!this.started) {
|
||||||
compiler.plugin('emit', this.emitHandler.bind(this));
|
compiler.plugin('emit', this.emitHandler.bind(this));
|
||||||
compiler.plugin('after-emit', this.afterEmitHandler.bind(this));
|
compiler.plugin('after-emit', this.afterEmitHandler.bind(this));
|
||||||
|
compiler.plugin('after-emit', this.afterEmitHandler.bind(this));
|
||||||
|
this.started = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
emitHandler(compilation, callback) {
|
emitHandler(compilation, callback) {
|
||||||
this.compilation = compilation;
|
this.compilation = compilation;
|
||||||
|
|||||||
Reference in New Issue
Block a user