From ea4a134f633e8d5d46f8cb4a01b1b9b79a657125 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 34219230..936d963c 100644 --- a/Gemfile +++ b/Gemfile @@ -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 diff --git a/Gemfile.lock b/Gemfile.lock index 6456af03..73457552 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) @@ -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) @@ -742,6 +745,7 @@ DEPENDENCIES lograge okcomputer pg + propshaft puma (~> 5.0) rack-attack rack-mini-profiler (~> 2.0) @@ -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 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