From 92fff56dd7ccc608fc418466b41dd5ef5b70bc5c Mon Sep 17 00:00:00 2001 From: Justin Coyne Date: Mon, 27 Feb 2023 11:48:00 -0600 Subject: [PATCH] Switch to propshaft and stop using Terser --- Gemfile | 5 +---- Gemfile.lock | 10 ++++++---- config/environments/production.rb | 2 +- 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/Gemfile b/Gemfile index 9f65fb4c..edaf4ac9 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index dc792f6f..02d73ee5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -716,6 +719,7 @@ DEPENDENCIES lograge okcomputer pg + propshaft puma (~> 5.0) rack-attack rack-mini-profiler (~> 2.0) @@ -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 diff --git a/config/environments/production.rb b/config/environments/production.rb index 91f6e5c2..e1583e3c 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -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