Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow unresolved icon fallback to API/cdn mode #1359

Closed
jd-solanki opened this issue Aug 1, 2022 · 2 comments
Closed

Allow unresolved icon fallback to API/cdn mode #1359

jd-solanki opened this issue Aug 1, 2022 · 2 comments

Comments

@jd-solanki
Copy link
Contributor

Hi,

I am building Theme for third party developers where they can insert any icons for rendering this like. This same issue I described here: #544

I guess with new CDN option we can fallback to CDN mode when installed icon collection is not found.

assume, we have mdi collection installed and someone uses bx then Uno will fetch from cdn.

@antfu
Copy link
Member

antfu commented Aug 1, 2022

@jd-solanki
Copy link
Contributor Author

jd-solanki commented Aug 2, 2022

When we use cdn mode with regular nodejs mode, cdn mode takes over and all icons are fetched from API instead of first searching locally.

Feature request is the same behavior as how Iconify Icon component works. It first tries to fetch it from the registered collection and if collection is not found it fetches it from network/cdn.

Reproduction: https://codesandbox.io/s/uno-dynamic-icons-using-cdn-xndn5u

Previously you gave me a hint #544 (comment) but unfortunately I wasn't able to understand what you were referring to.

Regards.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants