FIX: ignore loose .es6 files during precompile

also corrects precompile statement to include preload store
This commit is contained in:
Sam 2017-04-17 11:04:00 -04:00
parent 6e5296a510
commit cfef100ed7
1 changed files with 2 additions and 2 deletions

View File

@ -79,7 +79,7 @@ module Discourse
end]
config.assets.precompile += %w{
vendor.js admin.js preload-store.js.es6
vendor.js admin.js preload-store.js
browser-update.js break_string.js ember_jquery.js
pretty-text-bundle.js wizard-application.js
wizard-vendor.js plugin.js plugin-third-party.js
@ -95,7 +95,7 @@ module Discourse
initializer :fix_sprockets_loose_file_searcher, after: :set_default_precompile do |app|
app.config.assets.precompile.delete(Sprockets::Railtie::LOOSE_APP_ASSETS)
start_path = ::Rails.root.join("app/assets").to_s
exclude = ['.hbs', '.js', '.css', '']
exclude = ['.es6', '.hbs', '.js', '.css', '']
app.config.assets.precompile << lambda do |logical_path, filename|
filename.start_with?(start_path) &&
!exclude.include?(File.extname(logical_path))