mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 06:41:25 +08:00
This reverts commit f4c6a6185517a7d8a17c3faefb7e2e8cc67c44a8 and a8325c9016230f5171e0b72d7bff069784f64d16 This update of ember-auto-import and webpack causes significantly higher memory use during rebuilds. This made ember-cli totally unusable on 1GB RAM / 2GB swap environments. We don't have a specific need for this upgrade right now, so reverting for now.
This commit is contained in:
@ -135,22 +135,6 @@ module ApplicationHelper
|
||||
path
|
||||
end
|
||||
|
||||
def preload_vendor_scripts
|
||||
scripts = ["vendor"]
|
||||
|
||||
if ENV["EMBER_CLI_PROD_ASSETS"] == "1"
|
||||
@@vendor_chunks ||= begin
|
||||
all_assets = ActionController::Base.helpers.assets_manifest.assets
|
||||
all_assets.keys.filter_map { |name| name[/\A(chunk\..*)\.js\z/, 1] }
|
||||
end
|
||||
scripts.push(*@@vendor_chunks)
|
||||
end
|
||||
|
||||
scripts.map do |name|
|
||||
preload_script(name)
|
||||
end.join("\n").html_safe
|
||||
end
|
||||
|
||||
def preload_script(script)
|
||||
path = script_asset_path(script)
|
||||
preload_script_url(path)
|
||||
|
Reference in New Issue
Block a user