This is an excellent plugin!
One issue I noticed is the lack of support for clip-path for example as those are referenced within SVG files via id.
Example from MDN
<svg viewBox="0 0 100 100">
<clipPath id="myClip">
<!--
Everything outside the circle will be
clipped and therefore invisible.
-->
<circle cx="40" cy="35" r="35" />
</clipPath>
<!-- The original black heart, for reference -->
<path
id="heart"
d="M10,30 A20,20,0,0,1,50,30 A20,20,0,0,1,90,30 Q90,60,50,90 Q10,60,10,30 Z" />
<!--
Only the portion of the red heart
inside the clip circle is visible.
-->
<use clip-path="url(#myClip)" href="#heart" fill="red" />
</svg>
Having multiple files that provide <clipPath id="myClip"> means that those lines of code exist multiple times and have naming conflicts as the id stays the same. The spritesheet will now use the first id it encounters instead of the one defined here.
The SVG optimizer svgo (online UI) automatically uses names like #a for any clip path.
Expected Result
Rename all id and references to something unique, like $filename-$id
Currently solveable by manually preparing the file
This is an excellent plugin!
One issue I noticed is the lack of support for
clip-pathfor example as those are referenced within SVG files via id.Example from MDN
Having multiple files that provide
<clipPath id="myClip">means that those lines of code exist multiple times and have naming conflicts as theidstays the same. The spritesheet will now use the first id it encounters instead of the one defined here.The SVG optimizer svgo (online UI) automatically uses names like
#afor any clip path.Expected Result
Rename all
idand references to something unique, like$filename-$idCurrently solveable by manually preparing the file