tools icon indicating copy to clipboard operation
tools copied to clipboard

Remove uglify-es/uglify-js, use terser

Open MattIPv4 opened this issue 3 years ago • 1 comments
trafficstars

It looks like uglify-es has been deprecated on NPM. Further, terser seems to a more common tool used for compressing JS assets, so we should replace uglify-js with it.

Hopefully this may also resolve issues seen with newer syntax such as top-level await (https://github.com/cdnjs/packages/runs/5103276658?check_suite_focus=true), and issues with bad compression of libraries (https://github.com/cdnjs/packages/issues/1363).

MattIPv4 avatar Feb 15 '22 13:02 MattIPv4

There are other examples of bad compression with uglify-js resulting in broken libraries: see, e.g. https://github.com/firebase/firebase-js-sdk/issues/5962#issuecomment-1035597821

rbubley avatar Nov 23 '22 17:11 rbubley