Skip to content

Commit

Permalink
try terser in staging for js compression
Browse files Browse the repository at this point in the history
  • Loading branch information
Jason Kotchoff committed Mar 16, 2022
1 parent a89f9df commit 76ff432
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ gem 'net-imap', require: false # Required by Ruby 3.1
gem 'net-pop', require: false # Required by Ruby 3.1
gem 'net-smtp', require: false # Required by Ruby 3.1

gem 'terser' # try this instead of uglifier in staging to fix the tinymce image upload

# Gems used only for assets and not required
# in production environments by default.
group :assets do
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,8 @@ GEM
strscan (3.0.1)
syntax (1.2.2)
temple (0.8.2)
terser (1.1.8)
execjs (>= 0.3.0, < 3)
thor (1.2.1)
tilt (2.0.10)
timecop (0.9.5)
Expand Down Expand Up @@ -398,6 +400,7 @@ DEPENDENCIES
stripe
stripe-ruby-mock (~> 3.1.0.rc2)
syntax
terser
timecop
tinymce-rails
uglifier
Expand Down
2 changes: 1 addition & 1 deletion config/environments/staging.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.new(harmony: true)
config.assets.js_compressor = :terser

# config.assets.css_compressor = :sass

Expand Down

0 comments on commit 76ff432

Please sign in to comment.