Skip to content

Commit

Permalink
use terser rather than uglifier
Browse files Browse the repository at this point in the history
Uglifier(harmony: true) fails; :uglifier does not suit for ES6

See: lautis/uglifier#185
  • Loading branch information
nicolas-entourage committed Jul 3, 2023
1 parent ae06d5f commit 904e088
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ gem 'rails', '~> 6.0'

gem 'sass-rails'
gem 'uglifier'
gem 'terser'
gem 'jquery-rails', '~> 4'
gem 'jquery-ui-rails', '~> 5'
gem 'turbolinks', '~> 5'
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,8 @@ GEM
attr_extras (>= 6.2.4)
diff-lcs
patience_diff
terser (1.1.16)
execjs (>= 0.3.0, < 3)
thor (1.2.2)
tilt (2.2.0)
timecop (0.9.6)
Expand Down Expand Up @@ -559,6 +561,7 @@ DEPENDENCIES
spring (~> 2.1.0)
spring-commands-rspec
super_diff
terser
timecop
tinymce-rails
turbolinks (~> 5)
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?

# 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 904e088

Please sign in to comment.