Skip to content

Commit 99bbbeb

Browse files
committed
feat(tapable): upgrade LibManifestPlugin to Tapable v1
1 parent dc7460f commit 99bbbeb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/LibManifestPlugin.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class LibManifestPlugin {
1313
}
1414

1515
apply(compiler) {
16-
compiler.plugin("emit", (compilation, callback) => {
16+
compiler.hooks.emit.tapAsync("LibManifestPlugin", (compilation, callback) => {
1717
asyncLib.forEach(compilation.chunks, (chunk, callback) => {
1818
if(!chunk.isInitial()) {
1919
callback();
@@ -51,7 +51,7 @@ class LibManifestPlugin {
5151
return obj;
5252
}, Object.create(null))
5353
};
54-
const content = new Buffer(JSON.stringify(manifest), "utf8"); //eslint-disable-line
54+
const content = new Buffer.from(JSON.stringify(manifest), "utf8");
5555
compiler.outputFileSystem.mkdirp(path.dirname(targetPath), err => {
5656
if(err) return callback(err);
5757
compiler.outputFileSystem.writeFile(targetPath, content, callback);

0 commit comments

Comments
 (0)