import { PluginOption } from 'vite'; /** * Configuration options for the SRI plugin. * Defines all available settings for customizing SRI generation behavior. */ interface SriPluginOptions { /** The hashing algorithm to use for generating SRI hashes. */ algorithm?: "sha256" | "sha384" | "sha512"; /** The CORS setting to use for fetched scripts and styles. */ crossorigin?: "anonymous" | "use-credentials"; /** Enable in-memory caching for remote fetches. Default: true */ fetchCache?: boolean; /** Abort remote fetches after the given milliseconds. Default: 5000 (0 disables). */ fetchTimeoutMs?: number; /** Add rel="modulepreload" with integrity for discovered dynamic chunks. Default: true */ preloadDynamicChunks?: boolean; /** Inject a tiny runtime that sets integrity on dynamically inserted