vite-plugin-sri3 weekly downloads statistics
By yoyo930021 (2 listings) · npm · Vite plugins
Subresource Integrity in Vite
vite-plugin-sri3 has 53,026 recorded weekly downloads on npm, an increase of 49.5% over the past 30 days, ranking #761 of 3,247 tracked listings.
About vite-plugin-sri3
vite-plugin-sri3
- Zero dependencies
- Changelog
Requirement
- Vite >= 3
- Nodejs >= 18
Install
# npm
npm i -D vite-plugin-sri3
# yarn
yarn add -D vite-plugin-sri3
# pnpm
pnpm i -D vite-plugin-sri3
Usage
// vite.config.(js|ts|mjs|mts)
import { defineConfig } from 'vite'
import { sri } from 'vite-plugin-sri3'
export default defineConfig({
plugins: [
// Please place it at the end to avoid ordering issues that might result in not getting the final content
// Unless you are using a package like vite-plugin-compression2, in which case it should be placed before it.
sri(),
],
})
Configuration
ignoreMissingAssetWhen using@vitejs/plugin-legacy, plugin can't not find some assets with legacy chunks. When this options enabled, plugin will ignore any missing asset error.
Default: false
sri({ ignoreMissingAsset: true })
Skip SRI on specific tags
Add the skip-sri attribute to any script or link tag to prevent SRI injection.
<script type="module" src="/path/to/asset.js" skip-sri></script>
<link rel="stylesheet" href="/path/to/asset.css" skip-sri />
Q&A
- Why not
rollup-plugin-srior@small-tech/vite-plugin-sri?- They can't work well in vite 4/5.
Tests & Coverage
- Run
pnpm coverageto execute the Vitest suite with instrumentation; inspect the generatedcoverage/reports locally or in CI artifacts. pnpm test:e2einvokes Playwright to validate healthy and tampered builds in Chromium, ensuring runtime SRI enforcement still triggers errors when hashes mismatch.- Integration fixtures rebuild the sample Vite app and assert deterministic
sha384hashes so plugin regressions surface before release.
Thanks
Without the following plugins, this plugin wouldn't exist.
Description from the npm listing.
- vite-plugin
- vite
- sri
- integrity
README badge
Show your rank in a README or on your website. The badge updates automatically.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
Ranking history
Listing placement
Listing placement
Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.
Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.
Recent observations
Full history (170)Similar npm Vite plugins plugins
All 20 vite-plugin-sri3 alternativesData source
Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.
Listing: https://www.npmjs.com/package/vite-plugin-sri3. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.