~cytrogen/masto-fe

ref: f0c720cfc9622ebb331f5d923cee8f1c71654698 masto-fe/lib/webpacker/manifest_extensions.rb -rw-r--r-- 388 bytes
f0c720cf — Claire Bump version to v4.3.0-alpha.0 (#27022) 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# frozen_string_literal: true

module Webpacker::ManifestExtensions
  def lookup(name, pack_type = {})
    asset = super

    if pack_type[:with_integrity] && asset.respond_to?(:dig)
      [asset.dig('src'), asset.dig('integrity')]
    elsif asset.respond_to?(:dig)
      asset.dig('src')
    else
      asset
    end
  end
end

Webpacker::Manifest.prepend(Webpacker::ManifestExtensions)