Skip to content

Commit 3252024

Browse files
authored
Merge pull request #239 from hathitrust/swap_terser_for_uglifier
Replace Uglifier with Terser for Bootstrap 5/ES6 compatibility.
2 parents 5833dae + e409262 commit 3252024

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Gemfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ gem "rails", "~> 6.1.7.9"
2323
gem "puma", "~> 5.6"
2424
# Use SCSS/SASS for stylesheets
2525
gem "sassc-rails"
26-
# Use Uglifier as compressor for JavaScript assets
27-
gem "uglifier", ">= 1.3.0"
26+
# Use Terser as compressor for JavaScript assets, previously used Uglifier
27+
gem "terser"
2828
# See https://github.com/rails/execjs#readme for more supported runtimes
2929
# gem 'mini_racer', platforms: :ruby
3030

Gemfile.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -352,6 +352,8 @@ GEM
352352
rubocop-performance (= 1.14.3)
353353
terminal-table (3.0.2)
354354
unicode-display_width (>= 1.1.1, < 3)
355+
terser (1.2.4)
356+
execjs (>= 0.3.0, < 3)
355357
thor (1.3.1)
356358
tilt (2.0.11)
357359
timeout (0.4.1)
@@ -360,8 +362,6 @@ GEM
360362
turbolinks-source (5.2.0)
361363
tzinfo (2.0.6)
362364
concurrent-ruby (~> 1.0)
363-
uglifier (4.2.0)
364-
execjs (>= 0.3.0, < 3)
365365
unf (0.1.4)
366366
unf_ext
367367
unf_ext (0.0.8.2)
@@ -438,9 +438,9 @@ DEPENDENCIES
438438
simplecov-lcov
439439
sqlite3
440440
standard
441+
terser
441442
turbolinks (~> 5)
442443
tzinfo-data
443-
uglifier (>= 1.3.0)
444444
w3c_validators
445445
web-console (>= 3.3.0)
446446
whois

config/environments/production.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?
2424

2525
# Compress JavaScripts and CSS.
26-
config.assets.js_compressor = :uglifier
26+
config.assets.js_compressor = :terser
2727
# config.assets.css_compressor = :sass
2828

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

0 commit comments

Comments
 (0)