Skip to content

Commit

Permalink
Use ruby-terser to compress javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
asideofcode-dev committed Jul 29, 2023
1 parent c686546 commit 0826ab5
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 @@ -34,7 +34,7 @@ gem 'rolify'
gem 'sassc-rails'
gem 'simple_form'
gem 'turbolinks'
gem 'uglifier'
gem 'terser', '~> 1.1'
gem 'will_paginate'
gem 'sprockets-rails'

Expand Down
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,8 @@ GEM
ssrf_filter (1.1.1)
stripe (8.6.0)
temple (0.10.2)
terser (1.1.17)
execjs (>= 0.3.0, < 3)
thor (1.2.2)
thread_safe (0.3.6)
tilt (2.2.0)
Expand All @@ -416,8 +418,6 @@ GEM
thread_safe (~> 0.1)
tzinfo-data (1.2023.3)
tzinfo (>= 1.0.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.4.2)
uniform_notifier (1.16.0)
version_gem (1.1.3)
Expand Down Expand Up @@ -507,9 +507,9 @@ DEPENDENCIES
spring-watcher-listen (~> 2.0.0)
sprockets-rails
stripe
terser (~> 1.1)
turbolinks
tzinfo-data
uglifier
web-console (>= 3.3.0)
webdrivers
will_paginate
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 0826ab5

Please sign in to comment.