Replace uglifier with terser in dummy applications

Terser is more up to date with modern javascript features, and the
uglifier gem repository recommends using it for minifying ES6+.

Followup for 955041b
This commit is contained in:
Hartley McGuire 2021-06-28 00:48:56 -04:00
parent f73b777adf
commit bcb300dccb
4 changed files with 6 additions and 6 deletions

View File

@ -23,7 +23,7 @@ gem "bcrypt", "~> 3.1.11", require: false
# This needs to be with require false to avoid it being automatically loaded by # This needs to be with require false to avoid it being automatically loaded by
# sprockets. # sprockets.
gem "uglifier", ">= 1.3.0", require: false gem "terser", ">= 1.1.4", require: false
# Explicitly avoid 1.x that doesn't support Ruby 2.4+ # Explicitly avoid 1.x that doesn't support Ruby 2.4+
gem "json", ">= 2.0.0" gem "json", ">= 2.0.0"

View File

@ -479,6 +479,8 @@ GEM
stackprof (0.2.17) stackprof (0.2.17)
sucker_punch (3.0.1) sucker_punch (3.0.1)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
terser (1.1.4)
execjs (>= 0.3.0, < 3)
thin (1.8.1) thin (1.8.1)
daemons (~> 1.0, >= 1.0.9) daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4) eventmachine (~> 1.0, >= 1.0.4)
@ -492,8 +494,6 @@ GEM
tzinfo (2.0.4) tzinfo (2.0.4)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
uber (0.1.0) uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.0.0) unicode-display_width (2.0.0)
useragent (0.16.10) useragent (0.16.10)
vegas (0.1.11) vegas (0.1.11)
@ -590,9 +590,9 @@ DEPENDENCIES
sqlite3 (~> 1.4) sqlite3 (~> 1.4)
stackprof stackprof
sucker_punch sucker_punch
terser (>= 1.1.4)
turbolinks (~> 5) turbolinks (~> 5)
tzinfo-data tzinfo-data
uglifier (>= 1.3.0)
w3c_validators (~> 1.3.6) w3c_validators (~> 1.3.6)
wdm (>= 0.1.0) wdm (>= 0.1.0)
webdrivers webdrivers

View File

@ -23,7 +23,7 @@ Rails.application.configure do
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS. # Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier config.assets.js_compressor = :terser
# config.assets.css_compressor = :sass # config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed. # Do not fallback to assets pipeline if a precompiled asset is missed.

View File

@ -25,7 +25,7 @@ Rails.application.configure do
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
# Compress JavaScripts and CSS. # Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier config.assets.js_compressor = :terser
# config.assets.css_compressor = :sass # config.assets.css_compressor = :sass
# Do not fallback to assets pipeline if a precompiled asset is missed. # Do not fallback to assets pipeline if a precompiled asset is missed.