-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
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
Replace uglifyjs-webpack-plugin with terser-webpack-plugin #2245
Comments
Maybe babel-minify is a better choice? |
Possibly - however, there are two aspects to take into consideration:
|
uglify-js is still maintained. The package that is not published anymore is uglify-es. You should open an issue at uglifyjs webpack plugin to ask them to switch to the uglify-js package instead. |
|
Let's keep this open for now, since we are not so sure about the stability of |
Just an update: It seems there are plans for Reference: |
Just an additional update - a PR for using However, if I've got that correctly, this will be part of v5, not a v4 release. |
What problem does this feature solve?
@vue/cli
is currently usinguglify-es
via the webpack plugin for script minification.However, regarding this comment,
uglify-es
is no longer actively maintained. This circumstance resulted in a fork, terser, especially to fix or at least work on the not-that-small amount of issuesuglify-es
had or still has (at least these).A PR to swap out
uglify-es
in favor ofterser
resulted in a different plugin - terser-webpack-plugin.Unless the maintenance of
uglify-es
surprisingly changes, I'd suggest to go with the maintained fork, especially since it has a better chance to get bugs fixed in a more reasonable amount of time.The new plugin's API is almost equivalent, only
uglifyOptions
was renamed toterserOptions
.What does the proposed API look like?
No new API; Current API unchanged as long as no one intercepts the
minimizer
configuration entry (it's currently not possible to just swap out the plugin options ofuglifyjs-webpack-plugin
via chaining).The text was updated successfully, but these errors were encountered: