Replace uglifyjs-webpack-plugin with terser-webpack-plugin
See original GitHub issueWhat problem does this feature solve?
@vue/cli
is currently using uglify-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 issues uglify-es
had or still has (at least these).
A PR to swap out uglify-es
in favor of terser
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 to terserOptions
.
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 of uglifyjs-webpack-plugin
via chaining).
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:7 (2 by maintainers)
Let’s keep this open for now, since we are not so sure about the stability of
terser
and how the fork itself will be maintained in the long run. Ultimately this is somethinguglifyjs-webpack-plugin
needs to consider as well.Maybe babel-minify is a better choice?