Skip to content

Commit

Permalink
Replace uglifier with terser in dummy applications
Browse files Browse the repository at this point in the history
Terser is more up to date with modern javascript features, and the
uglifier gem repository recommends using it for minifying ES6+.

Followup for 955041b
  • Loading branch information
skipkayhil committed Jun 28, 2021
1 parent f73b777 commit bcb300d
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Expand Up @@ -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
# 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+
gem "json", ">= 2.0.0"
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Expand Up @@ -479,6 +479,8 @@ GEM
stackprof (0.2.17)
sucker_punch (3.0.1)
concurrent-ruby (~> 1.0)
terser (1.1.4)
execjs (>= 0.3.0, < 3)
thin (1.8.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
Expand All @@ -492,8 +494,6 @@ GEM
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uber (0.1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.0.0)
useragent (0.16.10)
vegas (0.1.11)
Expand Down Expand Up @@ -590,9 +590,9 @@ DEPENDENCIES
sqlite3 (~> 1.4)
stackprof
sucker_punch
terser (>= 1.1.4)
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
w3c_validators (~> 1.3.6)
wdm (>= 0.1.0)
webdrivers
Expand Down
2 changes: 1 addition & 1 deletion actionmailbox/test/dummy/config/environments/production.rb
Expand Up @@ -23,7 +23,7 @@
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
config.assets.js_compressor = :terser
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
Expand Down
2 changes: 1 addition & 1 deletion actiontext/test/dummy/config/environments/production.rb
Expand Up @@ -25,7 +25,7 @@
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
config.assets.js_compressor = :terser
# config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
Expand Down

0 comments on commit bcb300d

Please sign in to comment.