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

Jonas Smedegaard dr at jones.dk
Fri Nov 6 10:26:07 GMT 2020


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

 * Terser can minify modern code (uglify-js 3 only ES5).
 * Uglify-js 3 needs 3 nodejs packages to build (terser needs 134).
 * Uglify-js 3 package is up-to-date (terser is 16 months behind).

Therefore, 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.

Specifically, do *not* casually switch a package from uglify-js 3 to 
terser when helping out others in the JavaScript team: Please ask first.

(avoid uglifyjs 2, however: It is ancient and unmaintained code!)


 - 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/25c1220b/attachment.sig>


More information about the Pkg-javascript-devel mailing list