UNPKG

vite-plugin-subresource-integrity

Version:

Subresource integrity (SRI) plugin for Vite

23 lines (20 loc) 551 B
import { Plugin } from 'vite'; type Algorithm = 'sha256' | 'sha384' | 'sha512'; interface SriOptions { /** * Which hashing algorithms to use when calculate the integrity hash for each * asset in the manifest. * * @default 'sha512' */ algorithm: Algorithm; /** * Path of ssr dist * * @default 'dist' */ ssrOutDir: string; hasSsr: false; } declare function subresourceIntegrity(options?: SriOptions): Plugin; export { type Algorithm, type SriOptions, subresourceIntegrity as default };