antfu / purge-icons

🎐 Bundles icons on demand
https://www.npmjs.com/package/purge-icons
MIT License
228 stars 18 forks source link

Local use #16

Closed anncwb closed 3 years ago

anncwb commented 3 years ago

Is there a way to use it in an environment that cannot be connected to the external network?

Because a large part of the system is running inside the local area network, is there any way not to request the online api, but still be able to use the plug-in.

anncwb commented 3 years ago

image

anncwb commented 3 years ago

My thought is can I change this online url to configure the url for myself

antfu commented 3 years ago

Install @iconify/json would use the ones from your local

anncwb commented 3 years ago

image

My dependencies are installed. How can I use it, my environment is vite2

anncwb commented 3 years ago

I found that @iconify/json is only installed in the project, but it is not used. My code is written here https://github.com/antfu/purge-icons/issues/4

antfu commented 3 years ago

In your code, it seems like you are composing icon ids dynamically, which is not detectable from static analysis, see https://github.com/antfu/purge-icons#usage.