@vitejs/plugin-vue weekly downloads statistics
By vitejs (9 listings) · npm · Vite plugins
The official plugin for Vue SFC support in Vite.
@vitejs/plugin-vue has 5,050,176 recorded weekly downloads on npm, a decrease of 39.4% over the past 30 days.
It ranks #129 of 2,256 tracked npm listings by weekly downloads.
Over 90 days, weekly downloads changed by -35.6%.
PluginStats has 121 daily observations since Jun 19, 2026; the latest is from Oct 17, 2026.
About @vitejs/plugin-vue
@vitejs/plugin-vue
Note: as of vue 3.2.13+ and @vitejs/plugin-vue 1.9.0+, @vue/compiler-sfc is no longer required as a peer dependency.
For JSX / TSX support, @vitejs/plugin-vue-jsx is also needed.
Options
Asset URL handling
When @vitejs/plugin-vue compiles the blocks in SFCs, it also converts any encountered asset URLs into ESM imports.
For example, the following template snippet:
Is the same as:
By default the following tag/attribute combinations are transformed, and can be configured using the template.transformAssetUrls option.
Note that only attribute values that are static strings are transformed. Otherwise, you'd need to import the asset manually, e.g. import imgUrl from '../image.png'.
Example for passing options to vue/compiler-sfc:
Example for transforming custom blocks
Create a file named Demo.vue, add lang="yaml" to the blocks, then you can use the syntax of YAML:
message is mounted on the i18n property of the component instance, you can use like this:
Using Vue SFCs as Custom Elements
Requires vue@^3.2.0 & @vitejs/plugin-vue@^1.4.0
Vue 3.2 introduces the defineCustomElement method, which works with SFCs. By default, tags inside SFCs are extracted and merged into CSS files during build. However when shipping a library of custom elements, it may be desirable to inline the styles as JavaScript strings and inject them into the custom elements' shadow root instead.
Starting in 1.4.0, files ending with *.ce.vue will be compiled in "custom elements" mode: its tags are compiled into inlined CSS strings and attached to the component as its styles property:
Note in custom elements mode there is no need to use since the CSS is already scoped inside the shadow DOM.
The customElement plugin option can be used to configure the behavior:
• { customElement: true } will import all *.vue files in custom element mode. • Use a string or regex pattern to change how files should be loaded as Custom Elements (this check is applied after include and exclude matches).
License
MIT
Description from the npm listing.
- vite
- vite-plugin
- vue
Where @vitejs/plugin-vue 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 (121)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/@vitejs/plugin-vue. First seen Oct 16, 2026; last successful collection Oct 19, 2026. See the methodology.