Skip to content
PluginStats

@spiriit/vite-plugin-svg-spritemap weekly downloads statistics

By spiriit · npm · Vite plugins

Generates symbol-based SVG spritemap from all .svg files in a directory

View on npm Stale · Oct 18, 2026

@spiriit/vite-plugin-svg-spritemap has 8,065 recorded weekly downloads on npm, a decrease of 47.8% over the past 30 days.

Weekly downloads
8,065
Official API · Oct 18, 2026
7-day growth
-42.4%
-5.9K weekly downloads
30-day growth
-47.8%
-7.4K weekly downloads
90-day growth
-47.0%
-7.1K weekly downloads
Rank
—
Among tracked npm listings

About @spiriit/vite-plugin-svg-spritemap

npm node-current Coverage Status

vite-plugin-svg-spritemap

This plugin supports Vite 7 and 8.

This ViteJS plugin generates a single SVG spritemap with <symbol>/<view>/<use> for each SVG file. It can also generate a stylesheet (CSS/SCSS/Stylus/Less) containing the sprites to be used directly (via a Data URI or SVG fragments).

[!NOTE] This plugin is inspired by svg-spritemap-webpack-plugin for Webpack.

🚀 Features

  • ⚡ Fully integrated in your ViteJS environment
  • 📦 Pack your SVG files in one (spritemap) file
  • ✨ Use your SVG in <svg> or <img> tags and also directly in your CSS/SCSS/Stylus/Less
  • 🍕 Import SVG fragments as VueJS components
  • 🎨 Theme an icon per usage with variables
  • 🔥 HMR support
  • ⚙️ Optimize your SVGs with SVGO or OXVG

📦 Install

npm i -D @spiriit/vite-plugin-svg-spritemap

# yarn
yarn add -D @spiriit/vite-plugin-svg-spritemap

# pnpm
pnpm add -D @spiriit/vite-plugin-svg-spritemap

# bun
bun add -D @spiriit/vite-plugin-svg-spritemap

👨‍💻 Quick start

Add all your SVGs icons in one folder (like below /src/icons folder for example) and pass the first argument as a glob path including your svg files.

// vite.config.js / vite.config.ts
import VitePluginSvgSpritemap from '@spiriit/vite-plugin-svg-spritemap'

export default {
  plugins: [VitePluginSvgSpritemap('./src/icons/*.svg')]
}

You can access the spritemap via the route /__spritemap. All files processed by ViteJS will transform the path of the file on build. The prefix is sprite- by default.

The plugin will generate a spritemap to support all methods described below (files populated with <view> for fragments and <use> for sprite). This can be configured through options.

SVG

<svg>
  <use xlink:href="/__spritemap#sprite-spiriit"></use>
</svg>

By default the generated spritemap uses the deprecated xlink:href attribute inside the <use> tags for compatibility. You can switch to the standard href attribute or emit both with an xlink:href fallback, via the output.hrefAttribute option ('xlink:href' | 'href' | 'both').

Img

You need to add the suffix -view to access the fragment.

<img src="/__spritemap#sprite-spiriit-view" />

📚 Documentation

For more information, check the vite-plugin-svg-spritemap documentation. It covers everything from getting started to advanced topics.

👨‍💼 License

MIT

Description from the npm listing.

  • svg
  • sprites
  • spritemap
  • symbols
  • icons
  • sass
  • scss
  • css
  • less
  • stylus
  • variables
  • vite
  • vite-plugin

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

@spiriit/vite-plugin-svg-spritemap weekly downloads on npm, last 90 days: 8,065 weekly downloads as of Oct 18, 2026, -47.0% over 90 days.@spiriit/vite-plugin-svg-spritemapWeekly downloads on npm · Last 90 days8,065downloads / week-47.0% over 90 days05K10K15K20K25K30KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 24, 2026 – Oct 18, 2026 · 87 observations · Updated Oc…pluginstats.com
@spiriit/vite-plugin-svg-spritemap weekly downloads on npm, last 90 days: 8,065 weekly downloads as of Oct 18, 2026, -47.0% over 90 days.

7/30/90-day growth

@spiriit/vite-plugin-svg-spritemap weekly downloads growth on npm: -42.4% over 7 days, -47.8% over 30 days, -47.0% over 90 days.@spiriit/vite-plugin-svg-spritemapWeekly downloads growth on npm8,065downloads / week now7-day growth-5,946 weekly downloads-42.4%30-day growth-7,381 weekly downloads-47.8%90-day growth-7,148 weekly downloads-47.0%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
@spiriit/vite-plugin-svg-spritemap weekly downloads growth on npm: -42.4% over 7 days, -47.8% over 30 days, -47.0% over 90 days.

Ranking history

@spiriit/vite-plugin-svg-spritemap npm ranking history: currently #1009 (by weekly downloads).@spiriit/vite-plugin-svg-spritemapnpm ranking · by weekly downloads · Last 90 days#1009current rank#300#400#500#600#700#800#900#1000#1100Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 17, 2026 – Oct 21, 2026 · 5 observations · Updated Oct 18, 2026pluginstats.com
@spiriit/vite-plugin-svg-spritemap npm ranking history: currently #1009 (by weekly downloads).

Listing placement

All npm2,422 listings · 122 pages · 1,212 shown · page 51, #19 (overall #1,019)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins258 listings · 13 pages · page 9, #10 (overall #170)
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 (543)
Recent weekly downloads observations for @spiriit/vite-plugin-svg-spritemap
Date (UTC)Weekly downloadsChange vs. previous
8,065+146
7,919-1K
8,950-336
9,286-3.9K
13,213-4.8K
18,0140
18,014+4K
14,011+224
13,787+192
13,595+132
13,463+186
13,277-543
13,820-5.3K
19,115—

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/@spiriit/vite-plugin-svg-spritemap. First seen Oct 16, 2026; last successful collection Oct 22, 2026. See the methodology.