-
Notifications
You must be signed in to change notification settings - Fork 90
Closed
Description
Hi, When using Webpack 4 I receive the following warning message:
DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
at WebpackObfuscator.apply (../../node_modules/webpack-obfuscator/index.js:16:18)The warning can be fixed by using the new hooks API and replacing
compiler.plugin('compilation', function (compilation) {
compilation.plugin("optimize-chunk-assets", function (chunks, callback) {With this:
compiler.hooks.compilation.tap('WebpackObfuscator', function (compilation) {
compilation.hooks.optimizeChunkAssets.tap('WebpackObfuscator', function (chunks) {And removing the callback call. You can also keep backwards compatibility. Please take a look at my commit here.
petahbred, cmglez10, fujiokayu and wuguanghai45
Metadata
Metadata
Assignees
Labels
No labels