Skip to content

Commit

Permalink
use the new Rails 7 js compressor (terser)
Browse files Browse the repository at this point in the history
  • Loading branch information
syphax-bouazzouni committed May 29, 2022
1 parent 6c1d365 commit 87e809e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ gem 'rails', '7.0.3'
gem 'jsbundling-rails'

gem 'sass-rails', '~> 5.0'
gem 'uglifier', '>= 1.0.3'
gem 'terser' #ugilifer replacent
# See https://github.com/rails/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# gem 'duktape'
Expand Down
2 changes: 1 addition & 1 deletion config/environments/appliance.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# config.action_dispatch.rack_cache = true

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
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 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
config.assets.js_compressor = Uglifier.new(harmony: true)
config.assets.js_compressor = :terser

# Compress CSS using a preprocessor.
# config.assets.css_compressor = :sass
Expand Down
2 changes: 1 addition & 1 deletion config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
# config.action_dispatch.rack_cache = true

# Compress JavaScripts and CSS.
config.assets.js_compressor = Uglifier.new(harmony: true)
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 87e809e

Please sign in to comment.