Skip to content

Commit

Permalink
Merge pull request #1983 from alphagov/replace-uglifier-with-terser
Browse files Browse the repository at this point in the history
Replace Uglifier with Terser for JS compression
  • Loading branch information
davidtrussler authored Dec 14, 2023
2 parents 53f7c1d + 022487b commit 9e189d1
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ gem "sprockets-rails"
gem "state_machines"
gem "state_machines-mongoid"
gem "strip_attributes"
gem "uglifier"
gem "terser"
gem "whenever", require: false

group :test do
Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -739,14 +739,14 @@ GEM
statsd-ruby (1.5.0)
strip_attributes (1.13.0)
activemodel (>= 3.0, < 8.0)
terser (1.1.20)
execjs (>= 0.3.0, < 3)
thor (1.3.0)
tilt (2.0.10)
timecop (0.9.8)
timeout (0.4.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 @@ -832,8 +832,8 @@ DEPENDENCIES
state_machines-graphviz
state_machines-mongoid
strip_attributes
terser
timecop
uglifier
webmock
whenever

Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
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

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

0 comments on commit 9e189d1

Please sign in to comment.