Skip to content

Commit

Permalink
Merge pull request #239 from hathitrust/swap_terser_for_uglifier
Browse files Browse the repository at this point in the history
Replace Uglifier with Terser for Bootstrap 5/ES6 compatibility.
  • Loading branch information
moseshll authored Nov 20, 2024
2 parents 5833dae + e409262 commit 3252024
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ gem "rails", "~> 6.1.7.9"
gem "puma", "~> 5.6"
# Use SCSS/SASS for stylesheets
gem "sassc-rails"
# Use Uglifier as compressor for JavaScript assets
gem "uglifier", ">= 1.3.0"
# Use Terser as compressor for JavaScript assets, previously used Uglifier
gem "terser"
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'mini_racer', platforms: :ruby

Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,8 @@ GEM
rubocop-performance (= 1.14.3)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.2.4)
execjs (>= 0.3.0, < 3)
thor (1.3.1)
tilt (2.0.11)
timeout (0.4.1)
Expand All @@ -360,8 +362,6 @@ GEM
turbolinks-source (5.2.0)
tzinfo (2.0.6)
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)
Expand Down Expand Up @@ -438,9 +438,9 @@ DEPENDENCIES
simplecov-lcov
sqlite3
standard
terser
turbolinks (~> 5)
tzinfo-data
uglifier (>= 1.3.0)
w3c_validators
web-console (>= 3.3.0)
whois
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
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

0 comments on commit 3252024

Please sign in to comment.