
Product
Socket MCP Adds Org Alerts, Threat Feed Review, and Package Inspection
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.
vite-plugin-svg-mix
Advanced tools
Vite SVG Sprite 插件,不限制语言,React/Vue都可使用
通过 svgo 进行优化,svg-parser调整结构,svg-sprite 进行生成
$ pnpm add vite-plugin-svg-mix -D
vite.config.ts 中的配置插件import svgMix from 'vite-plugin-svg-mix'
import { resolve } from 'path'
export default () => {
return {
...,
plugins: [
...,
svgMix({
include: resolve(process.cwd(), 'src/assets/icons'),
injectTo: 'body',
prefix: 'icon',
}),
],
}
}
<style>
.icon {
display: inline-block;
width: 4em;
height: 4em;
stroke-width: 0;
stroke: currentColor;
fill: currentColor;
}
</style>
<svg class="icon" viewBox="0 0 32 32">
<use xlink:href="#icon-close"></use>
</svg>
FAQs
Vite SVG Sprite 插件,不限制语言,React/Vue都可使用
We found that vite-plugin-svg-mix 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.

Product
Socket MCP now lets AI assistants review org alerts, investigate threats using the Socket threat feed, and inspect package files in addition to dependency scoring.

Product
Socket Firewall blocks malicious VS Code and Open VSX extensions before install, protecting developers from compromised editor marketplaces.

Research
More than 140 Mastra npm packages were compromised in a supply chain attack that used a typosquatted dependency to deliver a cross-platform infostealer during installation.