From 6ded4911b8541d23e2748b024d7f87b4a67d958a Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Mon, 30 Oct 2023 14:56:50 -0400 Subject: Changed JS compressor to terser --- Gemfile | 2 +- Gemfile.lock | 6 +++--- config/environments/production.rb | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Gemfile b/Gemfile index 2aec2a4..993076b 100644 --- a/Gemfile +++ b/Gemfile @@ -16,7 +16,7 @@ gem 'webrick', '~> 1.7' # Use SCSS for stylesheets gem 'sassc-rails' # Use Uglifier as compressor for JavaScript assets -gem 'uglifier', '>= 1.3.0' +gem 'terser', '~> 1.1.19' # See https://github.com/rails/execjs#readme for more supported runtimes gem 'mini_racer' diff --git a/Gemfile.lock b/Gemfile.lock index d9f4ff2..da73401 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -370,6 +370,8 @@ GEM temple (0.10.3) terrapin (0.6.0) climate_control (>= 0.0.3, < 1.0) + terser (1.1.19) + execjs (>= 0.3.0, < 3) thor (1.3.0) tilt (2.3.0) timeout (0.4.0) @@ -378,8 +380,6 @@ GEM turbolinks-source (5.2.0) tzinfo (2.0.6) concurrent-ruby (~> 1.0) - uglifier (4.2.0) - execjs (>= 0.3.0, < 3) victor (0.3.4) warden (1.2.9) rack (>= 2.0.9) @@ -443,9 +443,9 @@ DEPENDENCIES spring-watcher-listen (~> 2.0.0) sprockets (= 3.7.2) sqlite3 + terser (~> 1.1.19) turbolinks (~> 5) tzinfo-data - uglifier (>= 1.3.0) web-console (>= 3.3.0) webrick (~> 1.7) whenever (~> 1.0.0) diff --git a/config/environments/production.rb b/config/environments/production.rb index ccd3012..8f8be04 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -24,7 +24,7 @@ Rails.application.configure do 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. -- cgit 1.4.1