From af78799d21e4f96b69352342df57abe2f560eb9d Mon Sep 17 00:00:00 2001 From: Stefan Staub Date: Tue, 2 Feb 2021 22:00:58 +0100 Subject: [PATCH] use harmony mode for uglifier. See https://github.com/lautis/uglifier/issues/127 --- config/environments/production.rb | 2 +- config/environments/stage.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 9295535b..b5090274 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -25,7 +25,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) # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed. diff --git a/config/environments/stage.rb b/config/environments/stage.rb index dd0f94a7..66ac5dbe 100644 --- a/config/environments/stage.rb +++ b/config/environments/stage.rb @@ -28,7 +28,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) # config.assets.css_compressor = :sass # Do not fallback to assets pipeline if a precompiled asset is missed.