Revert "DEV: Update to Sprockets 4.0 (#16467)" (#16524)

This reverts commit 01107e418e.

We have seen some random occurrences of corrupted assets, and think it may be related to the sprockets 4 update. Reverting for investigation
This commit is contained in:
David Taylor
2022-04-20 22:17:29 +01:00
committed by GitHub
parent 1551eaab01
commit c88ca23e8f
5 changed files with 27 additions and 25 deletions

View File

@@ -1,12 +0,0 @@
# frozen_string_literal: true
# One of the initializers in `discourse-ember-rails/lib/ember_rails.rb` tries to set
# the ember template compiler path based on a call to `Sprockets::Environment#resolve`
# which started returning an array in Sprockets 4.
# This doesn't seem to be needed - it was setting to the existing value, so we can just ignore it.
Ember::Handlebars::Template.singleton_class.prepend(Module.new do
def setup_ember_template_compiler(path)
return if path.is_a? Array
super
end
end)