Skip to content

Commit

Permalink
Switch to propshaft and stop using Terser
Browse files Browse the repository at this point in the history
  • Loading branch information
jcoyne committed Mar 3, 2023
1 parent ef1caad commit ea4a134
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,13 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 7.0'

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem 'sprockets-rails'
gem 'propshaft'

# Use Puma as the app server
gem 'puma', '~> 5.0'
# Use SCSS for stylesheets
gem 'sassc-rails'

# Use Terser as compressor for JavaScript assets
gem 'terser', '~> 1.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.7'
# Use Redis adapter for caching in production
Expand Down
10 changes: 6 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -453,6 +453,11 @@ GEM
ast (~> 2.4.1)
pg (1.4.6)
popper_js (1.16.1)
propshaft (0.6.4)
actionpack (>= 7.0.0)
activesupport (>= 7.0.0)
rack
railties (>= 7.0.0)
public_suffix (5.0.1)
puma (5.6.5)
nio4r (~> 2.0)
Expand Down Expand Up @@ -656,8 +661,6 @@ GEM
railties (>= 6.0.0)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
terser (1.1.14)
execjs (>= 0.3.0, < 3)
test_xml (0.1.8)
diffy (~> 3.0)
nokogiri (>= 1.3.2)
Expand Down Expand Up @@ -742,6 +745,7 @@ DEPENDENCIES
lograge
okcomputer
pg
propshaft
puma (~> 5.0)
rack-attack
rack-mini-profiler (~> 2.0)
Expand All @@ -765,10 +769,8 @@ DEPENDENCIES
sitemap_generator
slowpoke (~> 0.4)
solr_wrapper
sprockets-rails
sqlite3 (~> 1.4)
stimulus-rails (~> 1.2)
terser (~> 1.1)
turbo-rails (~> 1.3)
web-console (>= 4.1.0)
webdrivers
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 @@

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

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = false
Expand Down

0 comments on commit ea4a134

Please sign in to comment.