natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
996 stars 57 forks source link

Can I combine SVGs into an external SVG sprite file? #94

Closed ewzpack closed 1 year ago

ewzpack commented 1 year ago

I have a lot of SVGs that I use on multiple pages, and I want to cache them. I looked into the docs but couldn't determine if this was possible.

stramel commented 1 year ago

This is not currently possible. I'll take a look to see if we can tackle it in the v1 rework.

stramel commented 1 year ago

This isn't something we're looking to tackle on the initial release of v1. The v1 will only embed a single version of each icon when used then reference it from that point forward. This resolves multiple of the same icon being used in the page and adding page bloat.

This library is intended to embed the icon directly into the DOM. There won't be any requests for icons at runtime in the production build.

Going to close this for now as not planned.