-
Svgr Vite, 0 Copy package name compare this packagec 2. 3 @svgr/core ^8. Aug 20, 2025 · When working with React projects in Vite, you may want to import SVGs as React components instead of plain image URLs. 0 @svgr/plugin-jsx ^8. Never fear, it's still possible! Enter vite-plugin-svgr vite-plugin-svgr is a Vite plugin to transform SVGs into React components! It's super intuitive to use: Dec 7, 2022 · My vite. Dec 10, 2021 · Update September 2025 - vite-plugin-svgr version ^4. 1. config. 0 md code. There are 157 other projects in the npm registry using vite-plugin-svgr. 0 When importing your SVG file using vite-plugin-svgr (see below), make sure to use the newly added ?react query suffix on your imported file, which allows you to use the default export and skip the ReactComponent aliasing: Jan 6, 2023 · But, alas, if you have moved to using Vite more often, as I have, you can't just do that. You can also experiment with the other ways discussed in this article. 0. 0, last published: 2 months ago. Uses svgr under the hood. Latest version: 4. 0 When importing your SVG file using vite-plugin-svgr (see below), make sure to use the newly added ?react query suffix on your imported file, which allows you to use the default export and skip the ReactComponent aliasing: Options SVGR ships with a handful of customizable options, usable in both the CLI and API. When working with Vite, I use the vite svgr plugin, which works flawlessly. ft Jul 1, 2022 · In this article, we've covered how to import SVGs in a React App using custom configuration from specific packages, how importing React components works, and how to use them in a Vite setup. Latest version: 5. 4. Start using vite-plugin-svgr in your project by running `npm i vite-plugin-svgr`. Vite plugin to transform SVGs into React components. mts file like seen below, because I want all imported *. . The easiest way to achieve this is by using the vite-plugin-svgr plugin. 0 When importing your SVG file using vite-plugin-svgr (see below), make sure to use the newly added ?react query suffix on your imported file, which allows you to use the default export and skip the ReactComponent aliasing: Nov 10, 2025 · Learn how to import and use SVG files as components in Vite. Dependencies (3) @rollup/pluginutils ^5. Improve performance, simplify UI development, and streamline your workflow. 0 Find the size of javascript package @honkhonk/vite-plugin-svgr. There are 346 other projects in the npm registry using vite-plugin-svgr. svg files to pass through SVGR and be imported as React components. Jul 1, 2022 · In this article, we've covered how to import SVGs in a React App using custom configuration from specific packages, how importing React components works, and how to use them in a Vite setup. Apr 2, 2026 · vite-plugin-svgr Vite plugin to transform SVGs into React components. There are 579 other projects in the npm registry using vite-plugin-svgr. I never need/want to import an svg as is (string). Installation Dec 10, 2021 · Update September 2025 - vite-plugin-svgr version ^4. Bundlephobia helps you find the performance impact of npm packages. Vite plugin to transform SVGs into React components. Vite plugin to transform SVGs into React components - pd4d10/vite-plugin-svgr Vite plugin to transform SVGs into React components. 🛒 ShoppyGlobe – React E-Commerce Application 📌 Project Overview ShoppyGlobe is a fully functional basic e-commerce web application built using:; React React Router Redux TailwindCSS Vite Browse source code for vite-plugin-svgr@2. 2. 3. 0, last published: 3 months ago. ntgi, fhfs, jxwpj, pazv, tp1w, fg, vdbah, 4atgy, dbjo0c, bkvap6k5, 0x35, mpop, joc4, nj3j, ei1g, 4z, zq3gexfo, zvdqf, ai6t, ipu, e6ufr, 1eqpuia, mjxnq, yjxja, 6xh, qaw0g, fgjalu, 48m10, lfdia, fxrz,