diff --git a/Gemfile b/Gemfile index 01c2cfd7..4d71513f 100644 --- a/Gemfile +++ b/Gemfile @@ -7,6 +7,7 @@ gem 'mail', '~> 2.7.1' # bug with mail 2.8.0 https://github.com/mikel/mail/issue gem 'sassc-rails' gem 'less-rails' +gem 'uglifier' # See https://github.com/sstephenson/execjs#readme for more supported runtimes gem 'therubyracer', platforms: :ruby @@ -127,5 +128,3 @@ group :test do end gem "importmap-rails", "~> 1.1" - -gem "terser", "~> 1.1" diff --git a/Gemfile.lock b/Gemfile.lock index 5b1a9fe7..88fa2944 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -547,8 +547,6 @@ GEM sqlite3 (>= 1.3.3) table_print (1.5.7) temple (0.9.1) - terser (1.1.13) - execjs (>= 0.3.0, < 3) therubyracer (0.12.3) libv8 (~> 3.16.14.15) ref @@ -569,6 +567,8 @@ GEM unf (~> 0.1.0) tzinfo (2.0.5) concurrent-ruby (~> 1.0) + uglifier (4.2.0) + execjs (>= 0.3.0, < 3) unf (0.1.4) unf_ext unf_ext (0.0.8.2) @@ -683,9 +683,9 @@ DEPENDENCIES sprockets (< 4) sqlite3 (~> 1.3.6) table_print - terser (~> 1.1) therubyracer twitter-bootstrap-rails (~> 2.2.8) + uglifier web-console whenever diff --git a/config/environments/production.rb b/config/environments/production.rb index d08234e5..266c31af 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -29,7 +29,7 @@ Rails.application.configure do config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :terser + config.assets.js_compressor = Uglifier.new(harmony: true) config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed.