nuxt-modules / svg-sprite

Optimize SVG files and combine them into sprite
https://codesandbox.io/s/github/nuxt-community/svg-sprite-module/
MIT License
295 stars 41 forks source link

Question about reducing size of exported svg file #301

Open KaragiannidesAgapios opened 9 months ago

KaragiannidesAgapios commented 9 months ago

Nuxt 2.17.1v nuxtjs/svg-sprite 0.5.2v

First of all thank you for this great package, and all of your effort of providing a tool like this.

I have a quite a big library of svg icons (850-+ unique icons). Some of them are used and some others don't.

I ran a lighthouse test before a while, and inside the Largest Contentful Paint, the second biggest file was the svg that was outputed for my icons. 176.6 KiB.

Question: Is there a way to to export in this file only the icons that are actually used? Or I have to manually cleanup my library and only keep the svg's that i actually use?

If there's another approach of dealing with this, please let me know.

Thanks again