Skip to content
PluginStats

vite-plugin-svg-icons-ng weekly downloads statistics

By yangxu52 · npm · Vite plugins

Vite plugin for easily creating an SVG sprite and injecting it for use, with a brand-new version.

View on npm Stale · Oct 18, 2026

vite-plugin-svg-icons-ng has 6,106 recorded weekly downloads on npm, a decrease of 37.5% over the past 30 days, ranking #1093 of 2,391 tracked listings.

Weekly downloads
6,106
Official API · Oct 18, 2026
7-day growth
-38.2%
-3.8K weekly downloads
30-day growth
-37.5%
-3.7K weekly downloads
90-day growth
-22.9%
-1.8K weekly downloads
Rank
#1093
Among tracked npm listings

About vite-plugin-svg-icons-ng

vite-plugin-svg-icons-ng

A high-performance SVG icon plugin for Vite.

Automatically generates SVG sprites from files and configurable injects them at runtime, making icon usage simpler and more efficient.

Documentation | 中文文档

For coding agents, install the companion skill:

npx skills add yangxu52/vite-plugin-svg-icons-ng # For global installation, add -g

Install

pnpm add -D vite-plugin-svg-icons-ng

Quick Start

import { defineConfig } from 'vite'
import { createSvgIconsPlugin } from 'vite-plugin-svg-icons-ng'

export default defineConfig({
  plugins: [
    createSvgIconsPlugin({
      iconDirs: ['src/icons'],
    }),
  ],
})

At this point, the plugin can generate the SVG sprite and expose it through the standard Vite HTML flow.

Path resolution follows Vite: relative iconDirs are resolved from your Vite project root, while absolute paths are used as written. In monorepos, use an absolute path when the icon folder lives outside the current app root.

Default: htmlMode: 'inline', which injects the sprite into HTML. Use script for runtime mount + dev HMR, or none to disable automatic HTML injection.

If you use virtual:svg-icons/register, prefer htmlMode: 'none' to disable automatic HTML injection.

Use icons directly in templates, or encapsulate them in reusable components.

See Component Usage for framework examples.

<svg aria-hidden="true">
  <use xlink:href="#icon-icon1"></use>
</svg>

Highlights

  • File-based SVG icons with automatic sprite generation
  • Configurable HTML generation: script / inline / none
  • Cached compilation with HMR support
  • Consistent output across dev, build, and SSR flows
  • Safer icon sets with duplicate symbolId detection and optional build failure
  • Virtual modules for register, ids, and SSR sprite access

Virtual Modules

  • virtual:svg-icons/register: explicitly mount the sprite from a client entry
  • virtual:svg-icons/ids: read all generated symbol ids
  • virtual:svg-icons/sprite: read sprite markup for SSR template injection

Compatibility

Deprecated virtual module ids are still supported in the current release and are planned for removal in v2.0.0:

  • virtual:svg-icons-register -> virtual:svg-icons/register
  • virtual:svg-icons-names -> virtual:svg-icons/ids

Migration: update imports to the new slash-based virtual module ids before upgrading to v2.0.0.

Docs

Description from the npm listing.

  • vite
  • vite-plugin
  • svg
  • icon
  • svg-icon
  • svg-icons
  • sprite
  • spritemap
  • spritesheet
  • svg-sprite
  • svg-sprites
  • symbol
  • svg-symbol
  • svgo

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-svg-icons-ng weekly downloads on npm, last 90 days: 6,106 weekly downloads as of Oct 18, 2026, -22.9% over 90 days.vite-plugin-svg-icons-ngWeekly downloads on npm · Last 90 days6,106downloads / week-22.9% over 90 days4K5K6K7K8K9K10K11K12KJul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18downloads / weekobservedarchived (Internet Archive)no observationsJul 23, 2026 – Oct 18, 2026 · 88 observations · Updated Oc…pluginstats.com
vite-plugin-svg-icons-ng weekly downloads on npm, last 90 days: 6,106 weekly downloads as of Oct 18, 2026, -22.9% over 90 days.

7/30/90-day growth

vite-plugin-svg-icons-ng weekly downloads growth on npm: -38.2% over 7 days, -37.5% over 30 days, -22.9% over 90 days.vite-plugin-svg-icons-ngWeekly downloads growth on npm6,106downloads / week now7-day growth-3,777 weekly downloads-38.2%30-day growth-3,666 weekly downloads-37.5%90-day growth-1,810 weekly downloads-22.9%Growth vs. nearest observation to each baseline date · Updated Oct 18, 2026pluginstats.com
vite-plugin-svg-icons-ng weekly downloads growth on npm: -38.2% over 7 days, -37.5% over 30 days, -22.9% over 90 days.

Ranking history

vite-plugin-svg-icons-ng npm ranking history: currently #1093 (by weekly downloads).vite-plugin-svg-icons-ngnpm ranking · by weekly downloads · Last 90 days#1093current rank#1086#1088#1090#1092#1094#1096#1098Jul 23Aug 7Aug 22Sep 6Sep 21Oct 6Oct 21rankOct 18, 2026 – Oct 21, 2026 · 4 observations · Updated Oct 18, 2026pluginstats.com
vite-plugin-svg-icons-ng npm ranking history: currently #1093 (by weekly downloads).

Listing placement

All npm2,389 listings · 120 pages · 1,195 shown · page 56, #1 (overall #1,101)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins257 listings · 13 pages · page 10, #16 (overall #196)
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 (122)
Recent weekly downloads observations for vite-plugin-svg-icons-ng
Date (UTC)Weekly downloadsChange vs. previous
6,106+1.1K
5,007-2K
7,045-42
7,087-2.1K
9,199-1.3K
10,4790
10,479+596
9,883+428
9,455+1.1K
8,380+834
7,546+813
6,733-402
7,135-1.6K
8,780—

Similar npm Vite plugins plugins

All 20 vite-plugin-svg-icons-ng 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-svg-icons-ng. First seen Oct 16, 2026; last successful collection Oct 21, 2026. See the methodology.