From 041d2fbd2022128153aebc618567f2b22bee570a Mon Sep 17 00:00:00 2001 From: Tom Hipkin Date: Wed, 8 Jun 2022 16:04:22 +0100 Subject: [PATCH] Fix JS compression error by running Ugilifier in harmony mode When building the docker image in production with script/docker/update we get a new error: ``` ``` We follow the instruction to use `Uglifier.new(:harmony => true)` and sure enought the error is silenced. --- 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 f7e04180..17bc97d5 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -27,7 +27,7 @@ config.public_file_server.enabled = ENV["RAILS_SERVE_STATIC_FILES"].present? # Compress JavaScripts and CSS. - config.assets.js_compressor = :uglifier + config.assets.js_compressor = Uglifier.new(harmony: true) # Set a css_compressor so sassc-rails does not overwrite the compressor when running the tests config.assets.css_compressor = nil