webpack-cleanup-plugin icon indicating copy to clipboard operation
webpack-cleanup-plugin copied to clipboard

Tapable.plugin is deprecated

Open s00d opened this issue 7 years ago • 0 comments

webpack-cleanup-plugin is causing a warning with Webpack 4. When I run node --trace-deprecation ./node_modules/.bin/webpack get this:

(node:50169) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at WebpackCleanupPlugin.apply (.../node_modules/webpack-cleanup-plugin/lib/WebpackCleanupPlugin.js:37:16)

Just replace all compiler.plugin('hookName', ...) calls with compiler.hook.[hookName].tap or compiler.hook.[hookName].tapAsync if it's asynchronous and gets a callback as an argument.

s00d avatar Mar 19 '18 13:03 s00d