Skip to content

Vite plugin to load SVG file transform to symobl tag strings

Notifications You must be signed in to change notification settings

nicefan/vite-svg-symbol-loader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vite SVG transform to Symbol tag

Vite plugin to load SVG file transform to symobl tag strings

Version Downloads License

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
  }
})

About

Vite plugin to load SVG file transform to symobl tag strings

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published