From fcb8a71ff8adbf3b473251943541b5b9a4359c02 Mon Sep 17 00:00:00 2001 From: Randall Floyd Date: Wed, 9 Oct 2024 10:29:03 -0400 Subject: [PATCH] Fixing how Uglifier is configured due to compile errors in Rails 7 --- .dassie/config/environments/production.rb | 6 ++++-- .koppie/config/environments/production.rb | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.dassie/config/environments/production.rb b/.dassie/config/environments/production.rb index 729c6f5b55..2081dfcc04 100644 --- a/.dassie/config/environments/production.rb +++ b/.dassie/config/environments/production.rb @@ -23,8 +23,10 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = Uglifier.new(harmony: true) - # config.assets.css_compressor = :sass + config.assets.configure do |env| + env.js_compressor = :uglifier + # env.css_compressor = :sass + end # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false diff --git a/.koppie/config/environments/production.rb b/.koppie/config/environments/production.rb index 5033acb146..5689d2eb81 100644 --- a/.koppie/config/environments/production.rb +++ b/.koppie/config/environments/production.rb @@ -26,8 +26,10 @@ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = Uglifier.new(:harmony => true) - # config.assets.css_compressor = :sass + config.assets.configure do |env| + env.js_compressor = :uglifier + # env.css_compressor = :sass + end # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false