We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 832eefd commit 4490a52Copy full SHA for 4490a52
lib/freedom_patches/propshaft_patches.rb
@@ -11,9 +11,15 @@ def already_digested?
11
Propshaft::Helper.prepend(
12
Module.new do
13
def compute_asset_path(path, options = {})
14
+ attempts = 0
15
super
16
rescue Propshaft::MissingAssetError => e
- if Rails.env.test?
17
+ if Rails.env.development?
18
+ # Ember-cli might've replaced the assets
19
+ Rails.application.assets.load_path.send(:clear_cache)
20
+ attempts += 1
21
+ retry if attempts < 3
22
+ elsif Rails.env.test?
23
# Assets might not be compiled in test mode. Just return a fake path
24
"/assets/#{path.sub(".", "-aaaaaaaa.")}"
25
else
0 commit comments