The descriptions of uglify-js and uglify-es are the same except that uglify-es tacks "for ES6+" on the end. Based on that one would think uglify-es is the best option for ES6 code. On the other hand, uglify-es is older - version 3.3.9 published 5 months ago, versus uglify-js at version 3.4.2 published 2 days ago. Anyone want to clear up my confusion?
-
With uglify-js you need to transpile your ES6 code (babel) with uglify-es should be stright forward. Im not sure the versions between uglify-js and uglify-es being symetric but as far as I know. I have an old app (jquery) and I use uglify-es to minfy and uglify the code instead of new apps that uses webpack (which will take care of the js and the css)M. Gara– M. Gara2018-06-29 03:50:03 +00:00Commented Jun 29, 2018 at 3:50
-
According to the talk Building a Platform: Webpack and the Future, uglify-es comes with (better?) parallelism and caching, resulting in a significant speedup for Webpack 4.CodeManX– CodeManX2018-08-24 09:14:04 +00:00Commented Aug 24, 2018 at 9:14
Add a comment
|
1 Answer
uglify-js only supports ES5 code as input.
uglify-es also supports ES6, but is buggy and has been abandoned.
terser is a maintained replacement for it that can also handle ES6+.
2 Comments
João Pimentel Ferreira
where do you see that uglify-es has been abandoned? I'm asking because I use it for my projects. Just last week it got 1,3 million downloads, it really does not seem abandoned
Robbie Milejczak
by abandoned, Dan means it is no longer maintained. No developers work on the project, so it is out of date