Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error on Webpack 4.0: DeprecationWarning: Tapable.plugin is deprecated. Use new API on .hooks instead #17

Closed
guilhermebruzzi opened this issue Jul 10, 2018 · 2 comments

Comments

@guilhermebruzzi
Copy link

Using on package.json:

...
"webpack": "^4.15.1",
"html-webpack-plugin": "^3.2.0",
"html-webpack-inline-svg-plugin": "^1.2.4",

On webpack.config.babel.js:

import HtmlWebpackInlineSVGPlugin from 'html-webpack-inline-svg-plugin'

// ...
new HtmlWebpackPlugin({
          inject: true,
          template: path.join(__dirname, 'src/index.html'),
        }),
new HtmlWebpackInlineSVGPlugin({
          runPreEmit: true,
        }),

Full stacktrace of the error when running webpack-dev-server --hot:

node:69945) DeprecationWarning: Tapable.plugin is deprecated. Use new API on `.hooks` instead
    at HtmlWebpackInlineSVGPlugin.apply (/Users/guilhermebruzzi/projetos/vtex/checkout-instore/node_modules/html-webpack-inline-svg-plugin/index.js:44:18)
    at webpack (/Users/guilhermebruzzi/projetos/vtex/checkout-instore/node_modules/webpack/lib/webpack.js:37:12)
    at startDevServer (/Users/guilhermebruzzi/projetos/vtex/checkout-instore/node_modules/webpack-dev-server/bin/webpack-dev-server.js:379:16)
    at processOptions (/Users/guilhermebruzzi/projetos/vtex/checkout-instore/node_modules/webpack-dev-server/bin/webpack-dev-server.js:361:5)
    at <anonymous>
    at process._tickCallback (internal/process/next_tick.js:118:7)
    at Function.Module.runMain (module.js:692:11)
    at startup (bootstrap_node.js:194:16)
    at bootstrap_node.js:666:3
@captbaritone
Copy link

Looks like there is a migration guide here: https://medium.com/webpack/webpack-4-migration-guide-for-plugins-loaders-20a79b927202 Someone will need to upgrade this package to use the new API.

@theGC
Copy link
Owner

theGC commented Apr 27, 2020

sorted with v2.x.x

@theGC theGC closed this as completed Apr 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants