diff --git a/Gemfile b/Gemfile index 783ec29f..e1152d1b 100644 --- a/Gemfile +++ b/Gemfile @@ -33,7 +33,7 @@ gem 'whitelabel' gem 'bootstrap', '~> 5.3' gem 'font-awesome-rails' gem 'sass-rails' -gem 'uglifier' +gem 'terser' group :production do gem 'dalli' diff --git a/Gemfile.lock b/Gemfile.lock index c92955d8..3a8f8c2c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -398,6 +398,8 @@ GEM activesupport (>= 6.1) sprockets (>= 3.0.0) temple (0.10.3) + terser (1.2.6) + execjs (>= 0.3.0, < 3) thor (1.4.0) tilt (2.6.0) timeout (0.4.3) @@ -405,8 +407,6 @@ GEM ethon (>= 0.9.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - uglifier (4.2.1) - execjs (>= 0.3.0, < 3) unicode-display_width (3.1.4) unicode-emoji (~> 4.0, >= 4.0.4) unicode-emoji (4.0.4) @@ -477,7 +477,7 @@ DEPENDENCIES simple_form slim-rails sprockets (~> 3.7) - uglifier + terser validate_url web-console whitelabel diff --git a/config/environments/production.rb b/config/environments/production.rb index b3051c96..325781f3 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -28,7 +28,7 @@ # Compress CSS using a preprocessor. # config.assets.css_compressor = :sass - config.assets.js_compressor = Uglifier.new(harmony: true) + config.assets.js_compressor = :terser # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false