Vite plugin that adds subresource integrity (SRI) hashes to script and stylesheet imports in index.html at build time. Version 0.0.12 is the latest, with an unknown release cadence. It is a TypeScript rewrite of @small-tech/vite-plugin-sri, offering native type definitions and support for multiple frameworks (Vue, React, Svelte, Solid, Qwik, Lit, Preact, vanilla). Key differentiators: lightweight, no runtime overhead, and simple configuration. Alternatives include rollup-plugin-sri and @small-tech/vite-plugin-sri.
npm install vite-plugin-subresource-integrityVerified import paths — ran on the pinned version, not inferred.
Basic Vite configuration integrating the subresource integrity plugin.
No fix needed; SRI is only relevant for production builds.
Order plugins carefully: subresourceIntegrity() should be placed after HTML manipulation plugins.
Continue using this plugin or switch to rollup-plugin-sri if needed.
Manually add integrity attributes in HTML for dynamic chunks or use a full rollup SRI plugin.
Run `npm i --save-dev vite-plugin-subresource-integrity` and ensure import using default import.
Replace `require()` with `import` statement.
Use `import subresourceIntegrity from 'vite-plugin-subresource-integrity'`.
No dependency data recorded yet.