vite-plugin-solid-svg weekly downloads statistics
By jfgodoy · npm · Vite plugins
Import SVG files as Solid.js Components
vite-plugin-solid-svg has 7,100 recorded weekly downloads on npm, a decrease of 61.7% over the past 30 days.
It ranks #1002 of 2,251 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -62.3%.
PluginStats has 542 daily observations since Apr 24, 2025; the latest is from Oct 17, 2026.
About vite-plugin-solid-svg
vite-plugin-solid-svg
Extend Vite with ability to use SVG files as Solid.js components.
Features:
• SVGO optimization • Hot Module Replacement support • Support for ?component-solid query string • SSR
Currently supported Vite version:
4 or above
Install
Setup
typescript
vite adds its own definition for "*.svg" and defines them as string. As far as I know this cannot be overridden. So we have two options: put our types before those of vite, or use imports with querystring.
If you are using defaultAsComponent which is the default, you need to put our types definition before vite in the tsconfig.
if you change to defaultAsComponent=false, you should use a different type definition that only identifies an svg import as a solid component when it matches the querystring. And in this case, put it before "vite/client"
Options
If you need to configure svgo, you can also create a config file svgo.config.js in the project's root, following the instructions at svgo docs. The svgo.svgoConfig has precedence over the file.
Usage
Import as a Solid.js component:
To import all svg inside a folder, use import.meta.glob('@/svgs/*.svg', { as: 'component-solid' }). See Vite docs for more details.
Why
In a Solidjs + vite project, you can easily add an svg image using:
However the fill color of the image cannot be overriden. Importing the svg as a component solves this and allows css styles to cascade into the svg content. Furthermore there may be situations where you'll need to ensure the image has been fully loaded, for example, before starting an animation. This module gives you a component that you can control when it's loaded.
Credits
This plugin is based on the work from the following projects:
• https://github.com/visualfanatic/vite-svg • https://github.com/cobbcheng/vite-plugin-svgstring
Description from the npm listing.
- vite-plugin
- svg
- svgo
- vite
- solid
- solidjs
Where vite-plugin-solid-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.
Charts
Images: 30d · 1y · all time · 1600×900 dark
Adoption over time
7/30/90-day growth
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 (542)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/vite-plugin-solid-svg. First seen Oct 16, 2026; last successful collection Oct 18, 2026. See the methodology.