module Webpacker::ManifestS3::ManifestExtention

Private Instance Methods

load() click to toggle source
Calls superclass method
# File lib/webpacker/manifest_s3/manifest_extention.rb, line 6
def load
  if Webpacker::Configuration.manifest_s3_bucket && Webpacker::Configuration.manifest_s3_key
    resp = Webpacker::ManifestS3::S3Client.get_manifest
    JSON.parse(resp.body.read)
  else
    return super unless File.exist?(@path)
    JSON.parse(File.read(@path))
  end
rescue Aws::S3::Errors::ServiceError
  super
end