Webpack.js.org: Where do I find docs on how to upgrade a plugin to the new API on `.hooks`?

Created on 9 Apr 2019  路  6Comments  路  Source: webpack/webpack.js.org

Feature to document

Tapable new API .hooks

Additional information

(node:10572) DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead

All Internet search results only show answers for:

Q: My app broke, please help.
A: Upgrade a webpack plugin from v1 to v2.

As a plugin ~author~ heir, where do I find docs on the upgrade process?

API Plugins

All 6 comments

Looks like the hooks first appeared with this PR https://github.com/webpack/tapable/pull/37, which is massive and makes it difficult to extract the relevant bits of info.

Hi @givanse
I had a great reference for you, but it is somewhere in webpack/webpack repo pull requests, still trying to find. We were migrating some of the tests onto hooks and you could see how we did that from those PRs.

Can you also link to code where you use tapable

Unfortunately the code is not publicly available and I can't share it.

Is there any documentation?

Was this page helpful?
0 / 5 - 0 ratings