Skip to content
PluginStats

@poppanator/sveltekit-svg weekly downloads statistics

By poppanator · npm · Vite plugins

Import SVG files as Svelte components

View on npm Fresh · Oct 17, 2026

@poppanator/sveltekit-svg has 13,561 recorded weekly downloads on npm, a decrease of 51.2% over the past 30 days.

It ranks #843 of 2,251 tracked npm listings by weekly downloads.

Over 90 days, weekly downloads changed by -61.7%.

PluginStats has 543 daily observations since Apr 23, 2025; the latest is from Oct 17, 2026.

Weekly downloads
13,561
Official API · Oct 17, 2026
7-day growth
-49.3%
-13.2K weekly downloads
30-day growth
-51.2%
-14.2K weekly downloads
90-day growth
-61.7%
-21.9K weekly downloads
Rank
#843
Among tracked npm listings

About @poppanator/sveltekit-svg

SvelteKit SVG Plugin

This plugin makes it possible to import SVG files as Svelte components, inline SVG code or urls.

### NOTE! For Svelte 4 projects, use version 4 of this plugin

_NOTE! This plugin isn't just for SvelteKit, but works for any Svelte project using Vite_

Install

• yarn add --dev @poppanator/sveltekit-svg • npm install -D @poppanator/sveltekit-svg

Usage

In your vite.config.js

You can also pass multiple svg transformers based on paths if you want to apply different SVGO options for different SVGs

Svelte usage

Import as a Svelte component:

NOTE! It's recommended that you use the ?component query string if you use the suggested type definition below. The reason is that Vite ships a type definition for *.svg which states that import Comp from './file.svg returns a string.

So providing a default type definition for *.svg is in most cases causing a conflict which will lead to TSC errors when treating such an import as a Svelte component.

So the best way to avoid errors, current and future, is to always use import Comp from './file.svg?component with the suggested type definition at the end of this file.

When used as a component you can also pass attributes to the SVG

Import as file path:

Import as data URL:

In contrast to ?url this will apply SVGO optimization/transform before the the SVG is turned into a data URL

You can also pass the SVGO config option datauri as value to ?dataurl. This will, for instance, generate an URI encoded string

Import as code:

Options

• { • includePaths: ['src/assets/icons/', 'src/images/icons/'] • } • `

Typescript

For Typescript not to complain about file.svg?component et.al, add the following import statement to src/app.d.ts (or any .d.ts file somewhere in the path of your project where tsc can find it).

NOTE! If you have module/moduleResolution set to NodeNext in your Typescript config, you MUST include .d.ts in the import of the SVG type definition.

Notes on using with _Jest_

_I don't know if this still applies, but it's kept here for good measure_

According to a report _Jest_ will have trouble transforming .svg files when such is imported as a Svelte component.

The solution seems to be to add a module name mapper entry in the the jest.config.cjs file, like so:

where src/lib/EmptyIcon.svelte can contain just .

See the reported issue and solution

Description from the npm listing.

  • svelte-plugin
  • svelte
  • sveltekit-plugin
  • sveltekit
  • svg
  • svgo
  • vite-plugin
  • vite

Where @poppanator/sveltekit-svg sits in the listing

Each band is one page of 20. Weekly downloads on a log 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.

All npm2,248 listings · 113 pages · page 43, #3 (overall #843)
All npm: every listing in weekly downloads order
PNG SVG
Vite plugins250 listings · 13 pages · page 7, #19 (overall #139)
Vite plugins: every listing in weekly downloads order
PNG SVG

Charts

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

Adoption over time

@poppanator/sveltekit-svg weekly downloads on npm, last 90 days: 13,561 weekly downloads as of Oct 17, 2026, -61.7% over 90 days.@poppanator/sveltekit-svgWeekly downloads on npm · Last 90 days13,561downloads / week-61.7% over 90 days10K15K20K25K30K35K40KJul 19Aug 3Aug 18Sep 2Sep 17Oct 2Oct 17downloads / weekobservedarchived (Internet Archive)no observationsJul 20, 2026 – Oct 17, 2026 · 90 observations · Updated Oc…pluginstats.com
@poppanator/sveltekit-svg weekly downloads on npm, last 90 days: 13,561 weekly downloads as of Oct 17, 2026, -61.7% over 90 days.
PNG SVG

7/30/90-day growth

@poppanator/sveltekit-svg weekly downloads growth on npm: -49.3% over 7 days, -51.2% over 30 days, -61.7% over 90 days.@poppanator/sveltekit-svgWeekly downloads growth on npm13,561downloads / week now7-day growth-13,163 weekly downloads-49.3%30-day growth-14,225 weekly downloads-51.2%90-day growth-21,869 weekly downloads-61.7%Growth vs. nearest observation to each baseline date · Updated Oct 17, 2026pluginstats.com
@poppanator/sveltekit-svg weekly downloads growth on npm: -49.3% over 7 days, -51.2% over 30 days, -61.7% over 90 days.
PNG SVG

Ranking history

@poppanator/sveltekit-svg npm ranking history: currently #843 (by weekly downloads).@poppanator/sveltekit-svgnpm ranking · by weekly downloads · Last 90 days#843current rank#200#300#400#500#600#700#800#900Jul 20Aug 4Aug 19Sep 3Sep 18Oct 3Oct 18rankOct 17, 2026 – Oct 18, 2026 · 2 observations · Updated Oct 17, 2026pluginstats.com
@poppanator/sveltekit-svg npm ranking history: currently #843 (by weekly downloads).
PNG SVG

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.

Recent observations

Full history (543)
Recent weekly downloads observations for @poppanator/sveltekit-svg
Date (UTC)Weekly downloadsChange vs. previous
13,561-2.1K
15,614+1.6K
14,012-6.2K
20,194-6.4K
26,5640
26,564-59
26,623-101
26,724+242
26,482-550
27,032-1K
28,050-146
28,196-5.9K
34,084-132
34,216—

Similar npm Vite plugins plugins

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/@poppanator/sveltekit-svg. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.