Skip to content
PluginStats

vite-svg-loader weekly downloads statistics

By jpkleemans · npm · Vite plugins

Vite plugin to load SVG files as Vue components

View on npm Fresh · Dec 6, 2026

vite-svg-loader has 894,100 recorded weekly downloads on npm, a decrease of 12.2% over the past 30 days, ranking #309 of 3,247 tracked listings.

Weekly downloads
894,100
Official API · Dec 5, 2026
7-day growth
+7.7%
+63.9K weekly downloads
30-day growth
-12.2%
-124.6K weekly downloads
90-day growth
+56.0%
+321.1K weekly downloads
Rank
#309
▼ 7 in 7 days

About vite-svg-loader

Vite SVG loader

Vite plugin to load SVG files as Vue components, using SVGO for optimization.

<a href="https://www.npmjs.com/package/vite-svg-loader" target="_blank"><img src="https://img.shields.io/npm/v/vite-svg-loader?style=flat-square" alt="Version"></a> <a href="https://www.npmjs.com/package/vite-svg-loader" target="_blank"><img src="https://img.shields.io/npm/dw/vite-svg-loader?style=flat-square" alt="Downloads"></a> <a href="https://www.npmjs.com/package/vite-svg-loader" target="_blank"><img src="https://img.shields.io/npm/l/vite-svg-loader?style=flat-square" alt="License"></a>

<template>
  <MyIcon />
</template>

<script setup>
import MyIcon from './my-icon.svg'
</script>
Install
npm install vite-svg-loader --save-dev
Setup
vite.config.js
import svgLoader from 'vite-svg-loader'

export default defineConfig({
  plugins: [vue(), svgLoader()]
})
Import params
URL

SVGs can be imported as URLs using the ?url suffix:

import iconUrl from './my-icon.svg?url'
// 'data:image/svg+xml...'
Raw

SVGs can be imported as strings using the ?raw suffix:

import iconRaw from './my-icon.svg?raw'
// '<?xml version="1.0"?>...'
Component

SVGs can be explicitly imported as Vue components using the ?component suffix:

import IconComponent from './my-icon.svg?component'
// <IconComponent />
Default import config

When no explicit params are provided SVGs will be imported as Vue components by default. This can be changed using the defaultImport config setting, such that SVGs without params will be imported as URLs (or raw strings) instead.

vite.config.js
svgLoader({
  defaultImport: 'url' // or 'raw'
})
SVGO Configuration
vite.config.js
svgLoader({
  svgoConfig: {
    multipass: true
  }
})
Disable SVGO
vite.config.js
svgLoader({
  svgo: false
})
Skip SVGO for a single file

SVGO can be explicitly disabled for one file by adding the ?skipsvgo suffix:

import IconWithoutOptimizer from './my-icon.svg?skipsvgo'
// <IconWithoutOptimizer />
Use with TypeScript

If you use the loader in a Typescript project, you'll need to reference the type definitions inside vite-env.d.ts:

/// <reference types="vite/client" />
/// <reference types="vite-svg-loader" />

Sponsors

<a href="https://www.nexxtmove.nl/" target="_blank"> <img src="https://raw.githubusercontent.com/jpkleemans/attribute-events/gh-pages/nexxtmove-logo.svg" alt="Nexxtmove Logo" width="200"> </a>

Thanks to <a href="https://www.nexxtmove.nl/" target="_blank">Nexxtmove</a> for sponsoring the development of this project.
Your logo or name here? Sponsor this project.

Description from the npm listing.

  • vite-plugin
  • vite
  • vue
  • svg

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-svg-loader weekly downloads on npm, last 90 days: 894,100 weekly downloads as of Dec 5, 2026, +56.0% over 90 days.vite-svg-loaderWeekly downloads on npm · Last 90 days894,100downloads / week+56.0% over 90 days0200K400K600K800K1M1.2MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
vite-svg-loader weekly downloads on npm, last 90 days: 894,100 weekly downloads as of Dec 5, 2026, +56.0% over 90 days.

7/30/90-day growth

vite-svg-loader weekly downloads growth on npm: +7.7% over 7 days, -12.2% over 30 days, +56.0% over 90 days.vite-svg-loaderWeekly downloads growth on npm894,100downloads / week now7-day growth+63,850 weekly downloads+7.7%30-day growth-124,631 weekly downloads-12.2%90-day growth+321,073 weekly downloads+56.0%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
vite-svg-loader weekly downloads growth on npm: +7.7% over 7 days, -12.2% over 30 days, +56.0% over 90 days.

Ranking history

vite-svg-loader npm ranking history: currently #309 (by weekly downloads).vite-svg-loadernpm ranking · by weekly downloads · Last 90 days#309current rank#270#280#290#300#310#320Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
vite-svg-loader npm ranking history: currently #309 (by weekly downloads).

Listing placement

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

Listing placement

Vite plugins300 listings · 15 pages · page 3, #3 (overall #43)
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 (170)
Recent weekly downloads observations for vite-svg-loader
Date (UTC)Weekly downloadsChange vs. previous
894,100+2.7K
891,377+15.9K
875,463+12.6K
862,832+8.3K
854,539+13.1K
841,390+8.7K
832,697+2.4K
830,250+6.1K
824,118-11.8K
835,898-13.8K
849,655-9.4K
859,088-10.8K
869,913-10.4K
880,361—

Similar npm Vite plugins plugins

All 20 vite-svg-loader 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-svg-loader. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.