Last active
July 13, 2023 10:48
-
-
Save Bumboobee/892cbaacde17b4502c540a2536acdd5d to your computer and use it in GitHub Desktop.
Enable svg images on vite application ๐พ
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//install the plugin dependencies | |
npm i vite-plugin-svgr | |
//on vite.config.js, add the import and the plugin reference | |
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()], | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment