Skip to content
This repository has been archived by the owner on Mar 23, 2018. It is now read-only.

Tapable.plugin is deprecated #41

Open
s00d opened this issue Mar 19, 2018 · 0 comments
Open

Tapable.plugin is deprecated #41

s00d opened this issue Mar 19, 2018 · 0 comments

Comments

@s00d
Copy link

s00d commented Mar 19, 2018

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant