Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between uglify-js and uglify-es?

Tags:

uglifyjs

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?

like image 778
Qwertie Avatar asked Jun 27 '18 18:06

Qwertie


1 Answers

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+.

like image 158
Dan Abramov Avatar answered Oct 13 '22 12:10

Dan Abramov