This repository was archived by the owner on Mar 23, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -36,7 +36,12 @@ class Engine < ::Rails::Engine
36
36
end
37
37
end
38
38
39
- manifest_directory = config . assets . manifest || File . join ( ::Rails . public_path , config . assets . prefix )
39
+ manifest_directory = if config . assets . manifest
40
+ File . basename ( config . assets . manifest ) =~ /\. / ? File . dirname ( config . assets . manifest ) : config . assets . manifest
41
+ else
42
+ File . join ( ::Rails . public_path , config . assets . prefix )
43
+ end
44
+
40
45
manifest_path = File . join ( manifest_directory , "rjs_manifest.yml" )
41
46
config . requirejs . manifest_path = Pathname . new ( manifest_path )
42
47
end
@@ -70,8 +75,7 @@ class Engine < ::Rails::Engine
70
75
if ::Rails ::VERSION ::MAJOR >= 4
71
76
config . after_initialize do |app |
72
77
config = app . config
73
- rails_manifest_path = File . join ( app . root , 'public' , config . assets . prefix )
74
- rails_manifest = ::Sprockets ::Manifest . new ( app . assets , rails_manifest_path )
78
+ rails_manifest = ::Sprockets ::Manifest . new ( app . assets , config . assets . manifest )
75
79
if config . requirejs . manifest_path . exist? && rails_manifest
76
80
rjs_digests = YAML . load ( ERB . new ( File . new ( config . requirejs . manifest_path ) . read ) . result )
77
81
rails_manifest . assets . merge! ( rjs_digests )
You can’t perform that action at this time.
0 commit comments