I was trying to see if https://github.com/alrra/browser-logos/blob/a1f2645fce1ac1e41c2bca34f3fc4be89a376941/src/edge/edge.svg from (https://github.com/alrra/browser-logos/pull/180) was run through SVGOMG.
When I enabled the option Replace duplicate elements with links, I noticed an empty <defs/> being added. Maybe there should be a sanity check for this?
I believe SVGOMG is using v1.3.0, so bear with me if this is something fixed after 1.3.0.
Correct, a simple SVG without any use elements like:
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<text>
text element
</text>
</svg>
Now produces
<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg">
<defs/>
<text>
text element
</text>
</svg>
and the
Most helpful comment
Correct, a simple SVG without any use elements like:
Now produces
and the element is not needed for rendering.