cdnjs / tools

🛠 Tools for maintaining cdnjs - The #1 free and open source CDN built to make life easier for developers.
MIT License
23 stars 18 forks source link

Remove uglify-es/uglify-js, use terser #250

Open MattIPv4 opened 2 years ago

MattIPv4 commented 2 years ago

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).

rbubley commented 1 year ago

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