From 6610f0c140ce3c00313ab6564da054ec800f80b3 Mon Sep 17 00:00:00 2001 From: Just Me Date: Fri, 8 Sep 2023 17:54:02 +0300 Subject: [PATCH 1/2] Configure js compressor to support ES6 syntax fixes Uglifier::Error: Unexpected token: keyword (const). --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 5fdbf836..f3cc568d 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 = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false From 664cb47ce6d19e8c3cd9f9cd4f2e4e9520157c1a Mon Sep 17 00:00:00 2001 From: Just Me Date: Fri, 8 Sep 2023 17:56:21 +0300 Subject: [PATCH 2/2] fix rubocop offense --- config/environments/production.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index f3cc568d..de4eb364 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 = Uglifier.new(harmony: true) + config.assets.js_compressor = Uglifier.new harmony: true # Do not fallback to assets pipeline if a precompiled asset is missed. config.assets.compile = false