Tapable.plugin is deprecated
See original GitHub issueWebpackShellPlugin is causing a warning with Webpack 4. When I run node --trace-deprecation ./node_modules/.bin/webpack
I get this:
(node:83992) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
at WebpackShellPlugin.apply (/projectDir/node_modules/webpack-shell-plugin/lib/index.js:236:16)
I would have submitted a PR, but looks like I can’t build the project without errors and it doesn’t pass linting. In addition, there hasn’t been much activity in a year so in case someone else is encountering the same issue, you can fix it locally.
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.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:6
- Comments:23
Top Results From Across the Web
Tapable.plugin is deprecated. Use new API on `.hooks` instead
What is the expected behavior? It shouldn't fail or provide a meaningful message that helps resolving the issue. The current message looks like ......
Read more >DeprecationWarning: Tapable.plugin is deprecated. Use new ...
There are several plugins that could be causing this warning on Webpack 4 or newer, because they are still using the old plugin...
Read more >deprecationwarning: maintemplate.hooks.rendermanifest is ...
DeprecationWarning: Tapable.apply is deprecated. Call apply on the plugin directly instead DeprecationWarning: Tapable.plugin is deprecated. Use new API on .
Read more >Tapable.plugin is deprecated. Use new API on `.hooks` instead
I am trying to upgrade my Webpack 4 to Webpack5. (Earlier it was Webpack2). On running node --trace-deprecation ...
Read more >Fixed: Error on yarn start: Tapable.plugin is deprecated - sage
Hi all,. After I have tried to install sage on a lot of different node versions I keep on ending up getting an...
Read more >Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I fixed this by ditching the plugin and using the new Webpack Plugin API directly from my webpack config:
@tlaak alright, thanks for the reply - went with the solution by @jchook which worked 👍