File tree Expand file tree Collapse file tree 2 files changed +8
-10
lines changed
Expand file tree Collapse file tree 2 files changed +8
-10
lines changed Original file line number Diff line number Diff line change 44# @private
55class Sprockets ::Asset
66 def sourcemap
7+ if included
8+ return included . inject ( SourceMap ::Map . new ) do |map , path |
9+ asset = @environment . load ( path )
10+ map + asset . sourcemap
11+ end
12+ end
13+
714 relative_path = if pathname . to_s . include? ( Rails . root . to_s )
815 pathname . relative_path_from ( Rails . root )
916 else
@@ -22,12 +29,3 @@ def sourcemap
2229 SourceMap ::Map . new ( mappings , resource_path )
2330 end
2431end
25-
26- # @private
27- class Sprockets ::BundledAsset < Sprockets ::Asset
28- def sourcemap
29- to_a . inject ( SourceMap ::Map . new ) do |map , asset |
30- map + asset . sourcemap
31- end
32- end
33- end
Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ namespace :sourcemaps do
3434 Rails . application . assets . each_logical_path ( Rails . application . config . assets . precompile ) do |path |
3535 next unless path . end_with? ( '.js' )
3636 asset = Rails . application . assets . find_asset ( path )
37- next unless asset . kind_of? ( Sprockets :: BundledAsset )
37+ next unless asset . included
3838 map = asset . sourcemap
3939 Squash ::Uploader . new ( Squash ::Ruby . configuration ( :api_host ) ,
4040 skip_verification : Squash ::Ruby . configuration ( :skip_verification )
You can’t perform that action at this time.
0 commit comments