mirror of
https://github.com/discourse/discourse.git
synced 2025-05-30 15:28:37 +08:00
split js with vendor/application
avoid one huge js bundle and instead break it down to application and vendor (3rd party) our app changes a lot, vendor changes a lot less
This commit is contained in:
@ -58,7 +58,7 @@ module Discourse
|
||||
path =~ /assets\/images/ && !%w(.js .css).include?(File.extname(filename))
|
||||
end]
|
||||
|
||||
config.assets.precompile += ['common.css', 'desktop.css', 'mobile.css', 'admin.js', 'admin.css', 'shiny/shiny.css', 'preload_store.js', 'browser-update.js']
|
||||
config.assets.precompile += ['vendor.js', 'common.css', 'desktop.css', 'mobile.css', 'admin.js', 'admin.css', 'shiny/shiny.css', 'preload_store.js', 'browser-update.js']
|
||||
|
||||
# Precompile all defer
|
||||
Dir.glob("#{config.root}/app/assets/javascripts/defer/*.js").each do |file|
|
||||
|
Reference in New Issue
Block a user