File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed
Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 44# @private
55class Sprockets ::Asset
66 def sourcemap
7+ resource_path = [ Rails . application . config . assets . prefix , logical_path ] . join ( '/' )
8+
79 if included
8- return included . inject ( SourceMap ::Map . new ) do |map , path |
10+ return included . inject ( SourceMap ::Map . new ( [ ] , resource_path ) ) do |map , path |
911 asset = @environment . load ( path )
10- map + asset . sourcemap
12+ asset . sourcemap + map
1113 end
1214 end
1315
@@ -19,7 +21,6 @@ def sourcemap
1921 # any extensions after the ".js" can be removed, because they will have
2022 # already been processed
2123 relative_path . gsub! /(?<=\. js)\. .*$/ , ''
22- resource_path = [ Rails . application . config . assets . prefix , logical_path ] . join ( '/' )
2324
2425 mappings = Array . new
2526 to_s . lines . each_with_index do |_ , index |
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ namespace :sourcemaps do
4545 'revision' => Squash ::Ruby . current_revision ,
4646 'sourcemap' => Base64 . encode64 ( Zlib ::Deflate . deflate ( map . as_json . to_json ) ) ,
4747 'from' => 'concatenated' ,
48- 'to' => 'compiled' ,
48+ 'to' => 'compiled'
4949 }
5050 end
5151 end
You can’t perform that action at this time.
0 commit comments