Customize Symbol ID / add path name
Closed this issue · 2 comments
hackel commented
I am requesting a way to customize the generated symbol ID so that I can include the preceding path. I have the following directory structure:
icons/
Add/
Fill Circle.svg
Alert/
Fill Circle.svg
I want to be able to do e.g. <use xlink:href="__spritemap#sprite-Add/Fill%20Circle" />
. Otherwise the sprite is full of duplicate symbol IDs and becomes useless. Thank you!
Applelo commented
Hi, I need to do some check if I can implement this easily. An alternative could be a svgo plugin but I don't know if it is possible to implement the behavior you want. So I can't promise anything in the near future about this but I keep an eye on.
[EDIT] Maybe we can add an idify
option like the spritemap plugin for webpack to let you manage the id of the sprite dynamically?