-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
Inbuilt support for alternate minifiers #17398
Comments
We already support it - https://github.com/webpack-contrib/terser-webpack-plugin#swc, I don't think we need extra options, because it is just a couple of lines |
Also we supported almost all minifiers - https://github.com/privatenumber/minification-benchmarks, excpet:
For last two we can add a support to https://github.com/webpack-contrib/terser-webpack-plugin#swc, feel free to send a PR |
I see, are we looking to change the default minifier to something faster with the next webpack version? |
@burhanuday We haven't discussed this yet. I think will be great to align with rspack team here and maybe switch to |
@alexander-akait yes. will work on it. |
@alexander-akait opened a PR to the benchmark repo |
This issue had no activity for at least three months. It's subject to automatic issue closing if there is no activity in the next 15 days. |
Issue was closed because of inactivity. If you think this is still a valid issue, please file a new issue with additional information. |
Feature request
Have out of the box support for a faster minifier (possibly behind an experiment with the intention to make it default with webpack 6)
https://github.com/privatenumber/minification-benchmarks contains benchmark information for available minifiers. At this time, i dont have a strong preference towards an option
We have an open PR for a CSS minifier that we should consider under this issue as well #17309
What is the expected behavior?
Faster minification
What is motivation or use case for adding/changing the behavior?
To improve the build speed and DX, we should make it easy to switch to an alternate minifier
I am aware that another minifier can be passed explicitly but most devs dont know about this and face long build time issues. Minification is an area where we depend on an external tool that is not closely coupled to webpack
How should this be implemented in your opinion?
Let terser be the default choice for now. Have a flag
experiment.<minifier-name>
that when enabled, changes the JS (and possibly CSS) minifierAre you willing to work on this yourself?
yes
The text was updated successfully, but these errors were encountered: