JosephusPaye / Keen-UI

A lightweight Vue.js UI library with a simple API, inspired by Google's Material Design.
https://josephuspaye.github.io/Keen-UI/
MIT License
4.1k stars 438 forks source link

Icon support async load and cache it in localStorage #430

Closed ShanaMaid closed 5 years ago

ShanaMaid commented 5 years ago

For example, if a 100kb svg has been used in a production project, the user needs to load an additional 100kb svg content each time the project releases a new bundle.

If the svg is packaged in chunks, when the developer introduces a new svg (assuming 1 kb), the user needs to load an additional 100 kb of content for this 1 kb update.

If you use asynchronous loading and cache svg, the above problem does not occur.

my tool that solves the above problem: archer-svgs

online demo: click me

JosephusPaye commented 5 years ago

Hi @ShanaMaid,

Keen UI doesn't bundle many icons, and the UiIcon component is just a thin-wrapper around user-provided SVG or font-icons.

Your tool will probably be a better fit for application projects, not a library like Keen UI.

ShanaMaid commented 5 years ago

ok, you right! best wish for Keen UI