# frozen_string_literal: true require 'sewing_kit/webpack/manifest/base' module SewingKit module Webpack class Manifest class Production < Base @metadata = nil @metadata_path = nil # :nodoc: def asset_dependencies(entrypoint_name) metadata['entrypoints'][entrypoint_name] end def metadata # Cache at class level, as JSON loading/parsing can be expensive. @metadata ||= load_metadata end def load_metadata result = load_metadata_from_node raise LegacyManifestError, result unless result['entrypoints'] result end end end end end