DEV: Remove asset precompilation hack (#17428)

I don't think it's needed anymore?
This commit is contained in:
Jarek Radosz 2022-07-11 22:52:20 +02:00 committed by GitHub
parent 365f558bda
commit 162a1f8ba7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 0 additions and 12 deletions

View File

@ -243,18 +243,6 @@ module Discourse
# we got to clear the pool in case plugins connect # we got to clear the pool in case plugins connect
ActiveRecord::Base.connection_handler.clear_active_connections! ActiveRecord::Base.connection_handler.clear_active_connections!
# This nasty hack is required for not precompiling QUnit assets
# in test mode. see: https://github.com/rails/sprockets-rails/issues/299#issuecomment-167701012
ActiveSupport.on_load(:action_view) do
default_checker = ActionView::Base.precompiled_asset_checker
ActionView::Base.precompiled_asset_checker = -> logical_path do
default_checker[logical_path] ||
logical_path =~ /\/node_modules/ ||
logical_path =~ /\/dist/
end
end
end end
if ENV['RBTRACE'] == "1" if ENV['RBTRACE'] == "1"