vite-svg-symbol-loader
v1.0.0
Published
Vite plugin to load SVG file transform to symobl tag strings
Downloads
1
Readme
Vite SVG transform to Symbol tag
Vite plugin to load SVG file transform to symobl tag strings
Install
npm install vite-svg-symbol-loader --save-dev
Setup
vite.config.js
import svgSymbol from 'vite-svg-symbol-loader'
export default defineConfig({
plugins: [
svgSymbol({
id: 'icon-[name]'
})
]
})
SVGO Configuration
vite.config.js
svgLoader({
id: 'icon-[name]'
svgo: {
multipass: true
}
})