This feature would allow the usage of SVG's from various directories.
Currently, the envisioned use-case involves storing all the SVG files within a singular folder. However, it's no longer align with my usage.
For instance, consider a scenario where we have 2 completely separated icon sources: an npm package called "my-icons" and some project folder titled "local-icons". Now, I have to either choose a singular icon source or set iconDir: "." plugin parameter to the project's root, which is rather an inconvenient choice.
Proposed solution
1. Modify iconDir parameter type
The possible solution might be changing iconDir parameter type to string | string[], so that we can specify various folders as a source.
2. Allow multiple plugin instances
e.g. in vite's configuration allow to create multiple instances. Each instance would be responsible for its own set of icons.
Problem to solve
This feature would allow the usage of SVG's from various directories.
Currently, the envisioned use-case involves storing all the SVG files within a singular folder. However, it's no longer align with my usage.
For instance, consider a scenario where we have 2 completely separated icon sources: an npm package called "my-icons" and some project folder titled "local-icons". Now, I have to either choose a singular icon source or set
iconDir: "."
plugin parameter to the project's root, which is rather an inconvenient choice.Proposed solution
1. Modify
iconDir
parameter typeThe possible solution might be changing
iconDir
parameter type tostring | string[]
, so that we can specify various folders as a source.2. Allow multiple plugin instances
e.g. in vite's configuration allow to create multiple instances. Each instance would be responsible for its own set of icons.
However, the issue with this approach is to genererate d.ts file.
Please, let me know if you need any further assistance or clarification.
Thanks, I really appreciate your work)