svgr VS vite-plugin-svgr

Compare svgr vs vite-plugin-svgr and see what are their differences.

Our great sponsors
  • Klotho - AWS Cloud-aware infrastructure-from-code toolbox [NEW]
  • Appwrite - The Open Source Firebase alternative introduces iOS support
  • InfluxDB - Build time-series-based applications quickly and at scale.
  • Sonar - Write Clean JavaScript Code. Always.
svgr vite-plugin-svgr
26 3
9,309 237
- -
8.3 8.0
22 days ago about 2 months ago
TypeScript TypeScript
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.


Posts with mentions or reviews of svgr. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-01-20.


Posts with mentions or reviews of vite-plugin-svgr. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2022-08-22.
  • Migrating from Create React App (CRA) to Vite
    6 projects | | 22 Aug 2022
    We need vite-plugin-svgr in order to import SVGs as React components. For example:
  • Repeating variable names for imports, types and switch. Got to be a better way!
    3 projects | | 25 Feb 2022
    If you're using Vite, then maybe try one of these: - -
  • Using Vite with React
    18 projects | | 3 Apr 2021
    Instead of webpack svgr - vite has a community plugin vite-plugin-svgr. Looking at its source code I can tell that it does the work as needed. In the future, I may want to add more SVGR options (currently for custom colors we use css currentColor property), so I may contribute it or create a similar plugin. NOTE: vite bundles the static svg in addition to assets even if you use vite-plugin-svgr. So many useless files will be generated. This is a minor issue that can be unnoticeable. I created a script for deleting those files (it has 0 impacts on the bundle because the client does not download those chunks).

What are some alternatives?

When comparing svgr and vite-plugin-svgr you can also consider the following projects:

webpack-bundle-analyzer - Webpack plugin and CLI utility that represents bundle content as convenient interactive zoomable treemap

svg-sprite-loader - Webpack loader for creating SVG sprites.

svgo - ⚙️ Node.js tool for optimizing SVG files

esbuild - An extremely fast bundler for the web

react-markdown - Markdown component for React

raw-loader - A loader for webpack that allows importing files as a String

awesome-vite - ⚡️ A curated list of awesome things related to Vite.js

rollup-plugin-visualizer - 📈⚖️ Visuallize your bundle

blog-series-nextjs-nx - Source code for the Next.js + Nx blog series

vite-plugin-svg-icons - Vite Plugin for fast creating SVG sprites.

Konva - Konva.js is an HTML5 Canvas JavaScript framework that extends the 2d context by enabling canvas interactivity for desktop and mobile applications.