Open
Description
Describe the bug
We have the following test case in Parcel:
<!DOCTYPE html>
<svg>
<symbol id="all">
<rect width="100" height="100" x="0" y="0"/>
</symbol>
</svg>
<svg>
<use xlink:href="#all" href="#all"/>
</svg>
Each SVG is run through svgo
separately. Since svgo 3.1.0, the removeHiddenElems
removes the symbol
element because it is not referenced. However, it is referenced by a different SVG that will be minified separately.
There should be an option to disable this behavior, specifically when multiple SVGs will be embedded on the same page. You can disable the entire removeHiddenElems
plugin, but this also disables lots of other behavior such as removing invisible elements. It would be nice to have a more granular option.
Desktop (please complete the following information):
- SVGO Version 3.3.2
- NodeJs Version 20
- OS: N/A
Activity