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 10, 2023
1 parent b767520 commit 92fff56
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,14 +6,11 @@ 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 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 @@ -438,6 +438,11 @@ GEM
parser (3.2.1.0)
ast (~> 2.4.1)
pg (1.4.6)
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 @@ -633,8 +638,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 @@ -716,6 +719,7 @@ DEPENDENCIES
lograge
okcomputer
pg
propshaft
puma (~> 5.0)
rack-attack
rack-mini-profiler (~> 2.0)
Expand All @@ -738,10 +742,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 92fff56

Please sign in to comment.