Search code examples
uglifyjs

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


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?


Solution

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