Open Dima-Dim opened 4 years ago
In source svg code:
<svg viewBox={`${icon.viewBox}`} width="15" height="15"> <use xlinkHref={`sprite.svg#${icon.id}`}/> </svg>
When using the extract: true option, compiling yields:
xlink:href="sprite.svg#iconname-usage"
Why is -usage added? As a result, the link becomes invalid.
Because iconname is an id of sprite symbol and it's usage can be the same:
<svg> <symbol id="iconname">...</symbol> ... <use xlink:href="#iconname" id="iconname-usage" /> </svg>
In source svg code:
When using the extract: true option, compiling yields:
Why is -usage added? As a result, the link becomes invalid.