icons-pack / svelte-simple-icons

📦 This package provides the Simple Icons packaged as a set of Svelte components.
MIT License
50 stars 2 forks source link

Fat bundles, even if you only use one icon #55

Open lucasew opened 1 year ago

lucasew commented 1 year ago

I decided to use this library to add an icon to an app I am developing [0]. I really only need the Github [1] icon, but the way this is structured, I pay the cost to add all the icons. That's a bundle of about 5 MB uncompressed and ~1.1 MB compressed.

Because the components are auto sufficient, at least the GitHub one, I was able to just copy that Svelte file to the repo and remove the dependency. Now the app bundle is under 16 KB.

[0] https://base16-showcase.vercel.app/ [1] https://github.com/icons-pack/svelte-simple-icons/blob/main/src/components/Github.svelte

wootsbot commented 1 year ago

I am working on a Pr where I will have the shaking tree and src will be exposed.

wootsbot commented 10 months ago

I am performing a refactor that solves the issue.

live: https://github.com/icons-pack/svelte-simple-icons/releases/tag/v4.0.0-rc.2