class ViteRuby::MissingEntrypointError

def initialize(file_name:, last_build:, manifest:, config:)

def initialize(file_name:, last_build:, manifest:, config:)
  @file_name, @last_build, @manifest, @config = file_name, last_build, manifest, config
  super <<~MSG
    Vite Ruby can't find #{file_name} in the manifests.
    Possible causes:
    #{possible_causes(last_build)}
    :troubleshooting:
    #{"Manifest files found:\n#{config.manifest_paths.map { |path| "  #{path.relative_path_from(config.root)}" }.join("\n")}\n" if last_build.success}
    #{"Content in your manifests:\n#{JSON.pretty_generate(manifest)}\n" if last_build.success}
    #{"Last build in #{config.mode} mode:\n#{last_build.to_json}\n" if last_build.success}
  MSG
end