I am taking about files like https://github.com/mikhin/vite-figma/blob/main/src/ui/components/Lurkers.tsx
Having SVG in JSX files leads to a few problems:
- You can’t view SVG files in system image viewer
- You can’t edit SVG files in GUI editor
- You can’t use scripts like
svgo on these SVG files
Vite has a few tools to convert SVG file to React component automatically https://dev.to/cassidoo/importing-svg-files-as-react-components-with-vite-l3n
I am taking about files like https://github.com/mikhin/vite-figma/blob/main/src/ui/components/Lurkers.tsx
Having SVG in JSX files leads to a few problems:
svgoon these SVG filesVite has a few tools to convert SVG file to React component automatically https://dev.to/cassidoo/importing-svg-files-as-react-components-with-vite-l3n