Skip to content

Commit

Permalink
플러그인 수행 시점 변경
Browse files Browse the repository at this point in the history
- 수행 시점이 done이면 watch에 대응하지 못함
  • Loading branch information
beadss authored and unchai committed May 30, 2017
1 parent 4a71a86 commit bd8ade9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,16 @@ function ManifestReplacePlugin(options) {
ManifestReplacePlugin.prototype.apply = function (compiler) {
var pluginOptions = this.pluginOptions;

compiler.plugin('done', function () {
compiler.plugin('after-emit', function (compilation, callback) {
var manifest = require(path.join(this.options.output.path, pluginOptions.manifestFilename));

glob(path.join(pluginOptions.basedir, pluginOptions.src), function (err, files) {
files.forEach(function (file) {
replaceString(manifest, file);
});
});

callback();
});
};

Expand Down

0 comments on commit bd8ade9

Please sign in to comment.