documentcloud / jammit

Industrial Strength Asset Packaging for Rails
http://documentcloud.github.com/jammit/
MIT License
1.16k stars 197 forks source link

Replace uglifier with terser #274

Closed 6twenty closed 3 years ago

6twenty commented 3 years ago

This replaces Uglifier with the more modern Terser for minifying javascript, since Uglifier is only able to handle ES5 javascript and chokes on any modern syntax. Our plan to remove support for IE11 involves no longer transpiling our modern javascript down to ES5 syntax, so we need a corresponding minifier that's capable of understanding modern javascript. Terser also handles older javascript syntax just fine too, so this shouldn't yield any difference when minifying our older javascript code that's still written as ES5.

6twenty commented 3 years ago

Sorry - meant to target our own fork as the base branch for this one 🤦