jpkleemans / vite-svg-loader

Vite plugin to load SVG files as Vue components
MIT License
585 stars 61 forks source link

If i want use removeAttrs in vite project, what should i do #33

Closed beyourselfm closed 2 years ago

jpkleemans commented 2 years ago

Hi, you can configure SVGO by passing the svgoConfig param to svgLoader(). See https://github.com/jpkleemans/vite-svg-loader#svgo-configuration

svgLoader({
  svgoConfig: {
    plugins: [
      { removeAttrs: { attrs: ['fill'] } }
    ]
  }
})