Let's try to change Uglifier settings properly
This commit is contained in:
parent
60a0173e01
commit
65ab88da77
|
@ -12,11 +12,7 @@ Discourse::Application.configure do
|
||||||
# Disable Rails's static asset server (Apache or nginx will already do this)
|
# Disable Rails's static asset server (Apache or nginx will already do this)
|
||||||
config.serve_static_assets = GlobalSetting.serve_static_assets
|
config.serve_static_assets = GlobalSetting.serve_static_assets
|
||||||
|
|
||||||
if defined?(Uglifier)
|
config.assets.js_compressor = :uglifier
|
||||||
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024}, screw_ie8: false)
|
|
||||||
else
|
|
||||||
config.assets.js_compressor = :uglifier
|
|
||||||
end
|
|
||||||
|
|
||||||
config.assets.css_compressor = :sass
|
config.assets.css_compressor = :sass
|
||||||
|
|
||||||
|
|
|
@ -54,7 +54,7 @@ task 'assets:precompile:before' do
|
||||||
|
|
||||||
def evaluate(context, locals, &block)
|
def evaluate(context, locals, &block)
|
||||||
::Sprockets.cache_compiled("uglifier", data) do
|
::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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue