From 09bf6be5f15f0e756e907d5ae68c8b5931708a85 Mon Sep 17 00:00:00 2001 From: Bob Whitelock Date: Sat, 16 Nov 2019 01:43:41 +0000 Subject: [PATCH] Allow using ES6 syntax in production build See https://github.com/lautis/uglifier/issues/127#issuecomment-352224986. --- 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 c5c0ce1..809f90e 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -23,7 +23,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.