mirror of
https://github.com/discourse/discourse.git
synced 2025-04-14 20:00:50 +08:00
Check if Uglifier
is defined (we're precompiling assets)
This commit is contained in:
parent
8a6f9425d4
commit
42d9dedad1
@ -12,7 +12,12 @@ 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
|
||||
|
||||
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024})
|
||||
if defined?(Uglifier)
|
||||
config.assets.js_compressor = Uglifier.new(output: {max_line_len: 1024})
|
||||
else
|
||||
config.assets.js_compressor = :uglifier
|
||||
end
|
||||
|
||||
config.assets.css_compressor = :sass
|
||||
|
||||
# stuff should be pre-compiled
|
||||
|
Loading…
x
Reference in New Issue
Block a user