
Company News
Socket Partners with Replit to Block Malicious Packages in AI-Powered Development
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.
@small-tech/vite-plugin-sri
Advanced tools
A Vite plugin that adds subresource integrity hashes to your index.html file at build time.
Subresource integrity (SRI) plugin for Vite.
Adds subresource integrity hashes to script and stylesheet imports from your index.html file at build time.
npm i --save-dev @small-tech/vite-plugin-sri
In your vite.config.js file:
import { defineConfig } from 'vite'
import sri from '@small-tech/vite-plugin-sri'
export default defineConfig({
// …
plugins: [sri()]
})
Then:
npx vite build
Run npm test to test, npm run coverage to run coverage.
If you’re looking for a generic Rollup plugin that does the same thing, see rollup-plugin-sri by Jonas Kruckenberg that this one was inspired by.
Small Technology Foundation is a tiny, independent not-for-profit.
We exist in part thanks to patronage by people like you. If you share our vision and want to support our work, please become a patron or donate to us today and help us continue to exist.
Copyright © 2021-present Aral Balkan, Small Technology Foundation.
ISC.
FAQs
A Vite plugin that adds subresource integrity hashes to your index.html file at build time.
The npm package @small-tech/vite-plugin-sri receives a total of 176 weekly downloads. As such, @small-tech/vite-plugin-sri popularity was classified as not popular.
We found that @small-tech/vite-plugin-sri demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.

Research
/Security News
Newer packages in this compromise use native extensions and .pth loaders to execute JavaScript stealers in developer environments.