Skip to content

Tapable.plugin is deprecated #61

@tlaak

Description

@tlaak

WebpackShellPlugin is causing a warning with Webpack 4. When I run node --trace-deprecation ./node_modules/.bin/webpackI 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions