How to Import SVGs in a React and Vite app - freeCodeCamp.org
https://www.freecodecamp.org:443/news/how-to-import-svgs-in-react-and-vite/
WEBJul 1, 2022 · # with npm npm i vite-plugin-svgr # with yarn yarn add vite-plugin-svgr Next, add the plugin inside your app's vite.config.js: import { defineConfig } from "vite"; import react from "@vitejs/plugin-react"; import svgr from "vite-plugin-svgr"; // https://vitejs.dev/config/ export default defineConfig({ plugins: [svgr(), react()], });
DA: 43 PA: 94 MOZ Rank: 33