3 ms·
It seem like a super neat project, just why does it need to do the "SVG to React" transformation on the remote? (N.b. that remote endpoint is broken in the "fro
by myfonj 2y ago
It seem like a super neat project, just why does it need to do the "SVG to React" transformation on the remote? (N.b. that remote endpoint is broken in the "frozen" Firefox version.) It bundles SVGO already, so I'd guess bundling SVGR should not be a problem (?)
https://github.com/rossmoody/svg-gobbler/blob/a4a6e8a0511c7afa231e1c1c7f933bb814d98b4b/src/constants/server-config.ts#L5 https://github.com/rossmoody/svg-gobbler/blob/a4a6e8a0511c7a... on ...://us-west2-svg-gobbler.cloudfunctions.net/svg-gobbler-svgr , or ....://us-central1-svg-gobbler.cloudfunctions.net/SVGR in the Firefox version
- themoodyrooster 2y agoI'd prefer not to do this remotely, but I couldn't find a browser bundle from SVGR. SVGO provides one. If you can think of a way to do it, please let me know or post an issue on GitHub. Also you can see the server code in the server folder in case you're curious what it's doing.
- JoeyBananas 2y agoSaving an svg is fundamentally a matter of copying whatever is between the <svg> tags and pasting it into a text file. That's literally all you have to do. I have a 5 line JS function that I use for this.
- themoodyrooster 2y agoI don't think what you're saying applies to this conversation of transforming SVG code into configurable JSX for React using the SVGR package.