Skip to content

Commit

Permalink
Use modern asset compressors
Browse files Browse the repository at this point in the history
  • Loading branch information
hennevogel committed Mar 25, 2022
1 parent 7f50ea0 commit b13e65c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ gem 'open_uri_redirections'
# for stylesheets
gem 'sassc-rails'

# as compressor for JavaScript assets
gem 'uglifier'
# as javascript asset compressor
gem 'terser'

# for translations
gem 'fast_gettext', '>= 0.7.0'
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ GEM
dalli (3.2.1)
digest (3.1.0)
erubi (1.10.0)
execjs (2.7.0)
execjs (2.8.1)
faker (2.20.0)
i18n (>= 1.8.11, < 2)
faraday (1.10.0)
Expand Down Expand Up @@ -278,14 +278,14 @@ GEM
activesupport (>= 5.2)
sprockets (>= 3.0.0)
strscan (3.0.1)
terser (1.1.8)
execjs (>= 0.3.0, < 3)
text (1.3.1)
thor (1.2.1)
tilt (2.0.10)
timeout (0.2.0)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.1.0)
vcr (6.1.0)
webmock (3.14.0)
Expand Down Expand Up @@ -338,7 +338,7 @@ DEPENDENCIES
sassc-rails
selenium-webdriver
sprockets-rails
uglifier
terser
vcr
webmock
xmlhash (>= 1.2.2)
Expand Down
5 changes: 3 additions & 2 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
# Apache or NGINX already handles this.
config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present?

# Compress CSS using a preprocessor.
config.assets.css_compressor = :uglifier
# Compress assets using a preprocessor
config.assets.css_compressor = :sass
config.assets.js_compressor = :terser

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
Expand Down
Binary file removed vendor/cache/execjs-2.7.0.gem
Binary file not shown.
Binary file added vendor/cache/execjs-2.8.1.gem
Binary file not shown.
Binary file added vendor/cache/terser-1.1.8.gem
Binary file not shown.
Binary file removed vendor/cache/uglifier-4.2.0.gem
Binary file not shown.

0 comments on commit b13e65c

Please sign in to comment.