vite-plugin-sri-gen

JSON →
library 1.4.1 ·javascript
verified Apr 27, 2026

A Vite plugin that auto-generates Subresource Integrity (SRI) hashes for built assets and injects integrity/crossorigin attributes into HTML output. Current stable version 1.4.1, requires Node ≥18 and Vite ≥4. Released monthly. Key differentiators: supports multiple hash algorithms (sha256, sha384, sha512), optional lazy-loaded chunk integrity via runtime patch, Vite manifest augmentation for SSR/backend-owned HTML, configurable include/exclude patterns, and in-memory HTTP cache. ESM-only, builds on parse5 for HTML parsing. Does not work for most SSR frameworks unless pre-rendering HTML or reading the augmented manifest.

total hits 10
actors 3 distinct systems
last hit 1d ago AhrefsBot
GPTBot
5
Search engines
1
Humans
1

top countries 🇺🇸 United States · 🇬🇧 United Kingdom · 🇨🇦 Canada