Skip to content

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

@lucasew

Description

@lucasew

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions