antfu / purge-icons

🎐 Bundles icons on demand
https://www.npmjs.com/package/purge-icons
MIT License
229 stars 18 forks source link

Dynamic / cache-able Load, own icons #13

Closed MentalGear closed 3 years ago

MentalGear commented 3 years ago

Looks mighty interesting, yet I'm wondering:

  1. Does it also allow to dynamically pull icons, so they can be cacheable (for icons that are used across many pages)
  2. Can one only use the icon libraries provided, or also own svgs ?
antfu commented 3 years ago
  1. In that case, I think you can use Iconify directly, it will pull icons from their server and cache them in the localStorage.
  2. Yes, it's possible. See https://docs.iconify.design/sources/bundles/