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
tersergem - Remove
tersergem
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
execjswhich 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