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

Fix: Use safe compilation hooks to prevent deprecation warning #43

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hmak-dev
Copy link

@hmak-dev hmak-dev commented Jul 13, 2021

I was working on improving my Webpack build performance and faced this warning, just took a look at brotli-webpack-plugin source codes and had it fixed by putting it in the right compilation stage.

95% emitting emit BrotliPlugin(node:438254) [DEP_WEBPACK_COMPILATION_ASSETS] DeprecationWarning: Compilation.assets will be frozen in future, all modifications are deprecated.
BREAKING CHANGE: No more changes should happen to Compilation.assets after sealing the Compilation.
        Do changes to assets earlier, e. g. in Compilation.hooks.processAssets.
        Make sure to select an appropriate stage from Compilation.PROCESS_ASSETS_STAGE_*.
(Use `node --trace-deprecation ...` to show where the warning was created)

Also, kept old codes in case someone uses this plugin with older versions of Webpack to make sure this breaks nothing.

@siarhei-novik
Copy link

Guys, I need this fix. When you will update the plugin?
Many thanks!

@mo
Copy link

mo commented Jun 12, 2022

I'm also waiting for this fix ... any chance you could review it @mynameiswhm ?

@mo
Copy link

mo commented Jun 12, 2022

Actually, nevermind... I noticed compression-webpack-plugin has brotli support now so I just switched to that.

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

Successfully merging this pull request may close these issues.

None yet

3 participants