[Pkg-javascript-devel] use uglify-js 3 when possible, instead of terser

Jonas Smedegaard jonas at jones.dk
Fri Nov 6 11:00:42 GMT 2020


Quoting Pirate Praveen (2020-11-06 11:37:45)
> Though with more and more browsers supporting ES6 features natively, 
> transpiling to ES5 may not be necessary for many packages.

You talk about code where upstream targets ES6.

My recommendation is for code where upstream targets ES5.

I do not recommend to _introduce_ transpiling where upstream does not.


> I don't see the reason for new packages to use uglify-js.

When _upstream_ code is either written in ES5 or transpiled to ES5, 
these are the benefits of using uglify-js 3 instead of terser:

 * reduce risk of bugs in minification code
 * reduce risk of migration delays or getting kicked during freeze

Let me repeat my recommendation:

I recommend to use uglify-js 3 instead of terser, when possible.

For code that is written as or transpiled to ES5, better use uglify-js 3 
to minify it: Your package then a) gets minified using newest upstream 
knowledge, and b) reduces risk of getting caught in in a larger package 
migration.


 - Jonas

-- 
 * Jonas Smedegaard - idealist & Internet-arkitekt
 * Tlf.: +45 40843136  Website: http://dr.jones.dk/

 [x] quote me freely  [ ] ask before reusing  [ ] keep private
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: signature
URL: <http://alioth-lists.debian.net/pipermail/pkg-javascript-devel/attachments/20201106/db61f263/attachment.sig>


More information about the Pkg-javascript-devel mailing list