New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

@vividlemon/vite-plugin-sri

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vividlemon/vite-plugin-sri

A Vite plugin that adds subresource integrity hashes to your index.html file at build time.

latest
Source
npmnpm
Version
1.2.0
Version published
Maintainers
1
Created
Source

vite-plugin-sri

@vividlemon/vite-plugin-sri generates the integrity value in the transformIndexHtml hook, and if dynamic imports are used in the code, the correct integrity cannot be generated. This plugin is designed to solve this problem

Subresource integrity (SRI) plugin for Vite

Adds subresource integrity hashes to script and stylesheet imports from your index.html file at build time

Install

npmp i --D @vividlemon/vite-plugin-sri

Use

In your vite.config.ts file:

import { defineConfig } from 'vite'
import sri from '@vividlemon/vite-plugin-sri'

export default defineConfig({
  // …
  plugins: [sri()]
})

Keywords

Vite

FAQs

Package last updated on 05 Sep 2023

Did you know?

Socket

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.

Install

Related posts