unocss / unocss

The instant on-demand atomic CSS engine.

Home Page:https://unocss.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to dynamically import icons instead of directly use them in templates

widcardw opened this issue · comments

I'd like to dynamically import icons instead of directly use them in templates. However, I cannot see the icons, until I add them to template manually.

So I wonder that whether unocss can read the .ts or .json file to import icons...
Snipaste_2022-05-10_19-21-58

commented

Yes, it's surpported. And it works successfully in my project.