[Pkg-javascript-devel] Uglify-js vs terser: plan for bullseye

Pirate Praveen praveen at onenetbeyond.org
Mon Jul 29 06:12:16 BST 2019



On 2019, ജൂലൈ 29 5:37:42 AM IST, Jonas Smedegaard <jonas at jones.dk> wrote:
>terser and uglify-js are competing projects.
>
>I am unaware of any conclusive information on either of them being 
>superior to the other for all(!) use-cases.
>
>I intend to maintain both projects, unless convinced otherwise.

uglify-js only supports ES5. So uglify-js can only minify a subset of what terser can minify.

uglify-es was started to support ES6 and beyond but it is now unmaintained (lots of unfixed bugs) and led to terser as a fork.

Since node and many recent browsers natively support ES6, more and more projects are shipping native ES6. Uglify-js cannot be used for these. d3 switched to terser for example (one of the packages I maintain). Try minifying node-d3-zoom for example (change uglifyjs.terser to just uglifyjs in rules).

It reminds me the story of Newton and cat doors[1].

[1] https://science.howstuffworks.com/innovation/famous-inventors/5-isaac-newton-inventions2.htm

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



More information about the Pkg-javascript-devel mailing list