vite-svg-sprite-plugin
v0.0.12
Published
svg sprite plugin for vite
Downloads
5
Readme
Vite SVG Sprite Plugin
Install
yarn add vite-svg-sprite-plugin
or
npm install vite-svg-sprite-plugin
Setup
vite.config.js
import svgstore from 'vite-svg-sprite-plugin'
export default defineConfig({
plugins: [vue(), svgstore()]
})
main.js
import '@svgstore';
Options
default path is 'src/assets/icons'
svgstore({
inputFolder: 'src/assets/svgs'
})
Use
<svg>
<use xlinkHref={'#svgname'}></use>
</svg>