unplugin-svg-vue-component weekly downloads statistics
By jaw52 · npm · Vite plugins
Use svg as vue components with support for both vue2.7 and vue3.x
unplugin-svg-vue-component has 9,969 recorded weekly downloads on npm, a decrease of 39.2% over the past 30 days, ranking #962 of 2,322 tracked listings.
About unplugin-svg-vue-component
unplugin-svg-vue-component
Use SVG as vue components with support for both vue2.7 and vue3.x.
npm i -D unplugin-svg-vue-component
Usage
Vite
import svgPlugin from 'unplugin-svg-vue-component/vite'
import vue from '@vitejs/plugin-vue'
import { defineConfig } from 'vite'
export default defineConfig({
plugins: [
vue(),
svgPlugin(),
],
})
<script setup lang="ts">
import MsgIcon from './msg.svg'
// OR
// import MsgIcon from './msg.svg?component'
</script>
<template>
<MsgIcon />
</template>
Options
optimize: Disabled by default. Based on svgo
// https://github.com/svg/svgo
export default defineConfig({
plugins: [
vue2(),
svgPlugin({ optimize: true }),
],
})
Used in TypeScript
First tsconfig configuration
{
"compilerOptions": {
"types": ["unplugin-svg-vue-component/client"]
}
}
Then import the SVG using the following form to avoid ts errors
import MsgIcon from './msg.svg?component'
Acknowledgement
Integration of the following schemes
License
Description from the npm listing.
- vite
- svg-plugin
- vite-plugin
- vite-svg
- vue2
- vue3
- vue
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
7/30/90-day growth
Ranking history
Listing placement
Listing placement
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)Similar npm Vite plugins plugins
All 20 unplugin-svg-vue-component alternativesData 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/unplugin-svg-vue-component. First seen Oct 16, 2026; last successful collection Oct 20, 2026. See the methodology.