Skip to content
PluginStats

vite-plugin-react-rich-svg weekly downloads statistics

By iGoodie · npm · Vite plugins

Seamless SVG loader with versatile import options! (Such as React component, dataURI and raw html code)

View on npm Fresh · Dec 6, 2026

vite-plugin-react-rich-svg has 14,453 recorded weekly downloads on npm, a decrease of 67.3% over the past 30 days, ranking #1149 of 3,247 tracked listings.

Weekly downloads
14,453
Official API · Dec 5, 2026
7-day growth
+22.6%
+2.7K weekly downloads
30-day growth
-67.3%
-29.7K weekly downloads
90-day growth
+264%
+10.5K weekly downloads
Rank
#1149
▲ 33 in 7 days

About vite-plugin-react-rich-svg

<!-- Logo --> <p align="center"> <img src="https://raw.githubusercontent.com/iGoodie/vite-plugin-react-rich-svg/master/.github/assets/logo.svg" height="100px" alt="Logo"/> </p> <h1 align="center"> Vite Plugin: React Rich SVG </h1> <!-- Slogan --> <p align="center"> Seamless SVG loader with versatile import options (see <a href="https://igoodie.github.io/vite-plugin-react-rich-svg/">demo page</a>) </p> <!-- Badges --> <p align="center"> <!-- Main Badges --> <img src="https://raw.githubusercontent.com/iGoodie/paper-editor/master/.github/assets/main-badge.svg" height="20px"/> <a href="https://www.npmjs.com/package/vite-plugin-react-rich-svg"> <img src="https://img.shields.io/npm/v/vite-plugin-react-rich-svg"/> </a> <a href="https://github.com/iGoodie/vite-plugin-react-rich-svg/tags"> <img src="https://img.shields.io/github/v/tag/iGoodie/vite-plugin-react-rich-svg"/> </a> <a href="https://github.com/iGoodie/vite-plugin-react-rich-svg"> <img src="https://img.shields.io/github/languages/top/iGoodie/vite-plugin-react-rich-svg"/> </a> <br/> <!-- Github Badges --> <img src="https://raw.githubusercontent.com/iGoodie/paper-editor/master/.github/assets/github-badge.svg" height="20px"/> <a href="https://github.com/iGoodie/vite-plugin-react-rich-svg/commits/master"> <img src="https://img.shields.io/github/last-commit/iGoodie/vite-plugin-react-rich-svg"/> </a> <a href="https://github.com/iGoodie/vite-plugin-react-rich-svg/issues"> <img src="https://img.shields.io/github/issues/iGoodie/vite-plugin-react-rich-svg"/> </a> <a href="https://github.com/iGoodie/vite-plugin-react-rich-svg/tree/master/src"> <img src="https://img.shields.io/github/languages/code-size/iGoodie/vite-plugin-react-rich-svg"/> </a> <br/> <!-- Support Badges --> <img src="https://raw.githubusercontent.com/iGoodie/paper-editor/master/.github/assets/support-badge.svg" height="20px"/> <a href="https://discord.gg/KNxxdvN"> <img src="https://img.shields.io/discord/610497509437210624?label=discord"/> </a> <a href="https://www.patreon.com/iGoodie"> <img src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3DiGoodie%26type%3Dpatrons"/> </a> </p>

Description

A vite plugin that handles SVG loading with zero-config effort.

It handles loading raw (html string), inline data uri (data:svg+xml,...) and SVGR Component (with easily usable SVGO options) imports easily!

This plugin is heavily inspired by vite-svg-loader, which is an SVG loading Vite plugin for Vue. It is one of my favourites. Thanks to everyone contributed to it! 💜

How to use?

  1. Use your favorite package manager to install as dependency
npm install vite-plugin-react-rich-svg --save-dev
  1. Include it in your vite.config.ts
import richSvg from "vite-plugin-react-rich-svg";

export default defineConfig({
  plugins: [react(), richSvg()],
});
  1. If you're using Typescript, you might want to include the typings under vite-env.d.ts:
// Caveat: referencing our plugin first will ensure vite types do not overlap

/// <reference types="vite-plugin-react-rich-svg/client" />
/// <reference types="vite/client" />
  1. Start importing your SVGs! Happy coding!
// Raw string import
import viteLogoRaw from "./assets/vite.svg?raw";

// Data URL import
import viteLogoDataURL from "./assets/vite.svg?url";

// Base64 Encoded import
import viteLogoBase64 from "./assets/vite.svg?base64";

// SVGR Component import
import ViteLogoComponent from "./assets/vite.svg?component";

// Default import, not handled by our plugin
import viteLogo from "./assets/vite.svg";

Plugin Configurations

include option

Acts as a whitelist predicate for the files you want to be processed.

  richSvg({
    include: (path) => /.*\.icon\.svg$/.test(path),
    // ^ This config will only process files that look like:
    // ...chevron-right.icon.svg?raw
    // ...chevron-left.icon.svg?component
    // ...home.icon.svg?url
  }),

exclude option

Acts as a blacklist predicate for the files you want to be ignored.

  richSvg({
    exclude: (path) => /.*\.ignore\.svg$/.test(path),
    // ^ This config will ignore files that look like:
    // ...my-illustration.ignore.svg?raw
    // ...my-illustration.ignore.svg?component
    // ...my-illustration.ignore.svg?url
  }),

componentLoaderOptions option

  • svgrConfig = Options used while running SVGR on the original svg code/asset (See SVGR Options)

  • oxcConfig = Options passed to Vite's Oxc transform when generating JavaScript from the SVGR output (See Vite's transformWithOxc API)

  richSvg({
    componentLoaderOptions: {
      svgrConfig: {
        ref: true,
        memo: true,
      },
      // ^ This config will make it load component svg imports loads with forwardedRef & memo wrapped


      oxcConfig: {
        jsx: {
          runtime: "automatic",
        },
      },
      // ^ These options are passed to Oxc after SVGR generates the component code
    },
  }),

rawLoaderOptions option

  • svgoEnabled = Enables SVGO optimizations

  • svgoConfig = Options used while running SVGO optimizations on the original SVG asset (See SVGO Options)

  richSvg({
    rawLoaderOptions: {
      svgoEnabled: true,
      svgoConfig: {},
    },
  }),

base64LoaderOptions option

  • svgoEnabled = Enables SVGO optimizations

  • svgoConfig = Options used while running SVGO optimizations on the original SVG asset (See SVGO Options)

  richSvg({
    base64LoaderOptions: {
      svgoEnabled: true,
      svgoConfig: {},
    },
  }),

urlLoaderOptions option…

Description from the npm listing.

  • vite-plugin
  • react
  • svg
  • svgr
  • rich
  • import
  • prettier

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

vite-plugin-react-rich-svg weekly downloads on npm, last 90 days: 14,453 weekly downloads as of Dec 5, 2026, +264% over 90 days.vite-plugin-react-rich-svgWeekly downloads on npm · Last 90 days14,453downloads / week+264% over 90 days010K20K30K40K50KSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-plugin-react-rich-svg weekly downloads on npm, last 90 days: 14,453 weekly downloads as of Dec 5, 2026, +264% over 90 days.

7/30/90-day growth

vite-plugin-react-rich-svg weekly downloads growth on npm: +22.6% over 7 days, -67.3% over 30 days, +264% over 90 days.vite-plugin-react-rich-svgWeekly downloads growth on npm14,453downloads / week now7-day growth+2,662 weekly downloads+22.6%30-day growth-29,730 weekly downloads-67.3%90-day growth+10,480 weekly downloads+264%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-plugin-react-rich-svg weekly downloads growth on npm: +22.6% over 7 days, -67.3% over 30 days, +264% over 90 days.

Ranking history

vite-plugin-react-rich-svg npm ranking history: currently #1149 (by weekly downloads).vite-plugin-react-rich-svgnpm ranking · by weekly downloads · Last 90 days#1149current rank#200#400#600#800#1000#1200Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 17, 2026 – Dec 6, 2026 · 45 observations · Updated Dec 5, 2026pluginstats.com
vite-plugin-react-rich-svg npm ranking history: currently #1149 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 58, #9 (overall #1,149)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 10, #19 (overall #199)
Vite plugins: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (591)
Recent weekly downloads observations for vite-plugin-react-rich-svg
Date (UTC)Weekly downloadsChange vs. previous
14,453+11
14,442+1.1K
13,359+209
13,150+312
12,838+1.4K
11,484-280
11,764-27
11,791-298
12,089+231
11,858-290
12,148-1K
13,175-49
13,224-372
13,596—

Similar npm Vite plugins plugins

All 20 vite-plugin-react-rich-svg alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/vite-plugin-react-rich-svg. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.