Skip to content

Uses deprecated hooks in Webpack 5 #11

@marcins

Description

@marcins

With Webpack 5 this plugin results in a deprecation warning:

(node:96995) [DEP_WEBPACK_COMPILATION_OPTIMIZE_CHUNK_ASSETS] DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)
    at /Users/<REDACTED>/node_modules/wrapper-webpack-plugin/wrapper-webpack-plugin.js:40:43

I've fixed this in a bunch of our local plugins in a way that's compatible with Webpack 4 and Webpack 5 (by detecting the presence of the processAssets hook), I'll try and create a PR for that here, just raising the issue as a placeholder in case it takes me longer to get to it!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions