Vite plugin to transform SVGs into React components. Uses svgr under the hood.
// vite.config.js
import svgr from 'vite-plugin-svgr'
export default {
// ...
plugins: [svgr()],
}
Then SVG files can be imported as React components, just like create-react-app does:
import { ReactComponent as Logo } from './logo.svg';
MIT