Replace terser gem with its JS alternative
Problem
https://rubygems.org/gems/terser is a gem which wraps TerserJS to compress JS.
In !146348 (merged) we've removed the second to last gem which wraps JS and relies on execjs
. terser
would be the last one to remove to also remove execjs
Proposed solution
Replace terser
gem with its JS counterpart.
Implementation guide
- Add TerserJS as NPM dependency
- Use TerserJS instead of
terser
gem - Remove
terser
gem
Discussion
The following discussion from !146348 (merged) should be addressed:
-
@splattael started a discussion: (+1 comment) Observation The gem https://rubygems.org/gems/terser still uses
execjs
which is also wrapping JS. I wonder if we could make use of TerserJS instead in the near future and get rid ofexecjs
🎉 🤞
Edited by Peter Leitzen