diff --git a/Gemfile b/Gemfile index b60d3acf3..925b34f34 100644 --- a/Gemfile +++ b/Gemfile @@ -6,6 +6,7 @@ gem 'rails', '~> 6.0' gem 'sass-rails' gem 'uglifier' +gem 'terser' gem 'jquery-rails', '~> 4' gem 'jquery-ui-rails', '~> 5' gem 'turbolinks', '~> 5' diff --git a/Gemfile.lock b/Gemfile.lock index f89a92aba..7ed2d38cc 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -216,8 +216,11 @@ GEM kaminari-core (= 1.2.2) kaminari-core (1.2.2) libdatadog (2.0.0.1.0) + libdatadog (2.0.0.1.0-x86_64-linux) libddwaf (1.6.2.0.0) ffi (~> 1.0) + libddwaf (1.6.2.0.0-x86_64-linux) + ffi (~> 1.0) lograge (0.12.0) actionpack (>= 4) activesupport (>= 4) @@ -279,6 +282,8 @@ GEM nokogiri (1.14.3) mini_portile2 (~> 2.8.0) racc (~> 1.4) + nokogiri (1.14.3-x86_64-linux) + racc (~> 1.4) optimist (3.0.1) parallel (1.23.0) parser (3.2.2.0) @@ -451,6 +456,8 @@ GEM attr_extras (>= 6.2.4) diff-lcs patience_diff + terser (1.1.14) + execjs (>= 0.3.0, < 3) thor (1.2.1) tilt (2.1.0) timecop (0.9.6) @@ -552,6 +559,7 @@ DEPENDENCIES spring (~> 2.1.0) spring-commands-rspec super_diff + terser timecop tinymce-rails turbolinks (~> 5) diff --git a/config/environments/production.rb b/config/environments/production.rb index ef2151742..f11b6142d 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -26,7 +26,7 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = Uglifier.new(harmony: true) + config.assets.js_compressor = :terser # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed.