sendou.ink
sendou.ink copied to clipboard
Performance: don't load icons as JSX
See: https://twitter.com/_developit/status/1382838799420514317
I did some reading on this & the real question is whether there's any kind of realistic alternative - from what I've read, there isn't one that would achieve what you want. I think the current website already has good performance
Yeah I agree it's not a big deal but can provide improvements :) The alternative to explore seems to be the <use> tag. The twitter thread comments contain a lot of useful input.
is this issue still up? i looked up and a possible solution is to make a file with all SVG icons, include them in the HTML files, and using "<use>" wherever an icon should be displayed
Hey up it's still current. And yeah I think that sounds like an appropriate solution if there is a good way that doesn't compromise dev ergonomics too much.
This could be a viable solution https://github.com/forge42dev/vite-plugin-icons-spritesheet