Skip to content

Commit

Permalink
Don't use deprecated API in webpack4
Browse files Browse the repository at this point in the history
  • Loading branch information
jquense authored May 10, 2018
1 parent e63a89c commit 6c0ee30
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,13 @@ See https://www.npmjs.com/package/glob-all#notes
}

apply(compiler) {
compiler.plugin(`after-emit`, (compilation, done) =>
const afterEmit = (compilation, done) =>
applyAfterEmit(compiler, compilation, this).then(done, done)
);
if (compiler.hooks) {
compiler.hooks.afterEmit.tapAsync({ name: `UnusedFilesPlugin` }, afterEmit);
} else {
compiler.plugin(`after-emit`, afterEmit)
}
}
}

Expand Down

0 comments on commit 6c0ee30

Please sign in to comment.