-
Notifications
You must be signed in to change notification settings - Fork 6
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
Add webpack 5 support #8
Comments
@bebraw There is nothing holding you back using optimize-css-assets-webpack-plugin, but you could swap it for css-minimizer-webpack-plugin. The description says
And it doesn't use the deprecated hook call. |
@jarroput Yup, that plugin is my official recommendation. I would say fixing this issue is worth it given this particular plugin is getting five million downloads per week at the moment while the other one is hovering around 230k. The fix in #9 looks adequate. |
I second this. #9 looks mergable to me as well. |
there is
because of last-call-webpack-plugin any updates? |
@nikbelikov It's probably better to migrate to https://www.npmjs.com/package/css-minimizer-webpack-plugin or fork this one with the webpack 5 fix as the author seems busy. |
As webpack 5 has multiple deprecations, it seems this plugin is facing some of them as well. It seems the plugin still works but the APIs it depends on will be gone in the future.
I'm using the plugin through optimize-css-assets-webpack-plugin and when you use last-call-webpack-plugin, it emits the following deprecation warning:
DeprecationWarning: optimizeChunkAssets is deprecated (use Compilation.hook.processAssets instead and use one of Compilation.PROCESS_ASSETS_STAGE_* as stage option)
I believe you may need to add a check against webpack 4/5 (see https://github.com/webpack-contrib/mini-css-extract-plugin/blob/master/src/index.js for reference) and then adapt to the new API.
The text was updated successfully, but these errors were encountered: