Replace uglifier with terser

> UglifyJS only works with ES5. If you need to compress ES6, ruby-terser is a better option.

https://github.com/ahorek/terser-ruby
pull/2073/head
Simon Legner 1 year ago
parent a06462f6e3
commit 66d682eae9

@ -31,7 +31,7 @@ end
group :production do group :production do
gem 'newrelic_rpm' gem 'newrelic_rpm'
gem 'uglifier' gem "terser"
end end
group :development do group :development do

@ -113,6 +113,8 @@ GEM
strings-ansi (0.2.0) strings-ansi (0.2.0)
terminal-table (3.0.2) terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3) unicode-display_width (>= 1.1.1, < 3)
terser (1.1.20)
execjs (>= 0.3.0, < 3)
thin (1.8.2) thin (1.8.2)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4) eventmachine (~> 1.0, >= 1.0.4)
@ -127,8 +129,6 @@ GEM
ethon (>= 0.9.0) ethon (>= 0.9.0)
tzinfo (2.0.6) tzinfo (2.0.6)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.3.0) unicode-display_width (2.3.0)
unicode_utils (1.4.0) unicode_utils (1.4.0)
unix_utils (0.0.15) unix_utils (0.0.15)
@ -166,11 +166,11 @@ DEPENDENCIES
sprockets-helpers sprockets-helpers
sprockets-sass sprockets-sass
terminal-table terminal-table
terser
thin thin
thor thor
tty-pager tty-pager
typhoeus typhoeus
uglifier
unix_utils unix_utils
yajl-ruby yajl-ruby

@ -94,7 +94,7 @@ class App < Sinatra::Application
['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }] ['/manifest.json', { 'Cache-Control' => 'public, max-age=86400' }]
] ]
sprockets.js_compressor = Uglifier.new output: { :harmony => true, beautify: true, indent_level: 0 } sprockets.js_compressor = :terser
sprockets.css_compressor = :sass sprockets.css_compressor = :sass
Sprockets::Helpers.configure do |config| Sprockets::Helpers.configure do |config|

Loading…
Cancel
Save