From 65ab88da778c260d574c93b2ed0a269859a9ac7e Mon Sep 17 00:00:00 2001 From: Robin Ward <robin.ward@gmail.com> Date: Wed, 15 Oct 2014 16:50:58 -0400 Subject: [PATCH] Let's try to change Uglifier settings properly --- config/environments/production.rb | 6 +----- lib/tasks/assets.rake | 2 +- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/config/environments/production.rb b/config/environments/production.rb index 07133147f..aa4cd5719 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -12,11 +12,7 @@ Discourse::Application.configure do # Disable Rails's static asset server (Apache or nginx will already do this) config.serve_static_assets = GlobalSetting.serve_static_assets - if defined?(Uglifier) - config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024}, screw_ie8: false) - else - config.assets.js_compressor = :uglifier - end + config.assets.js_compressor = :uglifier config.assets.css_compressor = :sass diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 78f40f820..26d169435 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -54,7 +54,7 @@ task 'assets:precompile:before' do def evaluate(context, locals, &block) ::Sprockets.cache_compiled("uglifier", data) do - Uglifier.new(:comments => :none).compile(data) + Uglifier.new(:comments => :none, screw_ie8 => false, :output => {max_line_len: 1024}).compile(data) end end