I've been working on a set of 80 custom icons for a web app, and Figma's SVG export is driving me nuts. Every single icon comes out with nested <g> tags, inline styles, and sometimes a <rect> that covers the whole artboard. The file sizes are absurd for what should be simple paths. I tried running them through SVGO with a bunch of plugins, but it broke some gradients and clip paths, so I ended up manually cleaning each one in a text editor. Took hours.
I've tried the "Presentation attributes" export setting, and I've outlined all strokes, but it still adds extra groups. Illustrator's SVG export isn't much better, though at least it has more options for decimal precision and such. I know some bloat is fine if you're using a build step, but I'm inlining these as React components, so every extra byte counts. And it makes the code harder to read when I need to tweak something.
There has to be a better workflow. I've heard of plugins like "SVG Export" or "Figma to SVG" but I'm not sure which ones actually do a good job. Has anyone found a reliable way to get clean SVGs out of Figma? Or do you just accept the cruft and move on? I'm on a deadline here, so any tips would be appreciated.