Open Firsh opened 3 months ago
Although not with dynamic imports, that ended up putting ALL the icons in the sprite.
Is it normal that in dev, each time I use a component, both
symbol
anduse
are in thesvg
tag, leading to duplicate ids?
Yes. This is the easiest, fastest and hmr-friendly way of doing it in dev and has no impact on the behavior of the svg.
In dev, I could only reach that behavior by using ?sprite=inline, which for some reason fails to work in prod
The fact they're broken in prod is bad, I'll give that a look
Have you started SVGSoup? You radiated lots of enthusiasm in the article, I was hoping you wrote it since.
I haven't worked much on it. I initially wanted to but chronic depression decided otherwise 😄🔫
This plugin is still doing a good job so far
Thanks for this, I made it work better than svgr. Although not with dynamic imports, that ended up putting ALL the icons in the sprite.
Is it normal that in dev, each time I use a component, both
symbol
anduse
are in thesvg
tag, leading to duplicate ids? In prod when there is an actual sprite file requested, thesymbol
tags are correctly gone and onlyuse
remains in them, as expected.In dev, I could only reach that behavior by using ?sprite=inline, which for some reason fails to work in prod (the 0 width/height definition is not placed anywhere). For those I had to create an svg.d.ts file btw:
Have you started SVGSoup? You radiated lots of enthusiasm in the article, I was hoping you wrote it since.