Used to generate svg sprite map for vite.
- Migrating from webpack svg-sprite-loader to Vite doesn't work perfectly with vite-plugin-svg-icons
pnpm add vite-svg-sprite
// vite.config.ts
import { createSvgSpritePlugin } from 'vite-svg-sprite'
// @see https://vitejs.dev/config/
export default defineConfig({
plugins: [
// ...other plugins
createSvgSpritePlugin(/* options */),
],
})
or @see