Skip to content
PluginStats

@vitejs/plugin-vue weekly downloads statistics

By vitejs (9 listings) · npm · Vite plugins

The official plugin for Vue SFC support in Vite.

View on npm Fresh · Dec 6, 2026

@vitejs/plugin-vue has 16,546,724 recorded weekly downloads on npm, an increase of 12.2% over the past 30 days, ranking #128 of 3,247 tracked listings.

Weekly downloads
16,546,724
Official API · Dec 5, 2026
7-day growth
+8.9%
+1.4M weekly downloads
30-day growth
+12.2%
+1.8M weekly downloads
90-day growth
+103%
+8.4M weekly downloads
Rank
#128
Among tracked npm listings

About @vitejs/plugin-vue

@vitejs/plugin-vue npm

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.

// vite.config.js
import vue from '@vitejs/plugin-vue'

export default {
  plugins: [vue()],
}

For JSX / TSX support, @vitejs/plugin-vue-jsx is also needed.

Options

export interface Options {
  include?: string | RegExp | (string | RegExp)[]
  exclude?: string | RegExp | (string | RegExp)[]

  isProduction?: boolean

  /**
   * Requires @vitejs/plugin-vue@^5.1.0
   */
  features?: {
    /**
     * Enable reactive destructure for `defineProps`.
     * - Available in Vue 3.4 and later.
     * - **default:** `false` in Vue 3.4 (**experimental**), `true` in Vue 3.5+
     */
    propsDestructure?: boolean
    /**
     * Transform Vue SFCs into custom elements.
     * - `true`: all `*.vue` imports are converted into custom elements
     * - `string | RegExp`: matched files are converted into custom elements
     * - **default:** /\.ce\.vue$/
     */
    customElement?: boolean | string | RegExp | (string | RegExp)[]
    /**
     * Set to `false` to disable Options API support and allow related code in
     * Vue core to be dropped via dead-code elimination in production builds,
     * resulting in smaller bundles.
     * - **default:** `true`
     */
    optionsAPI?: boolean
    /**
     * Set to `true` to enable devtools support in production builds.
     * Results in slightly larger bundles.
     * - **default:** `false`
     */
    prodDevtools?: boolean
    /**
     * Set to `true` to enable detailed information for hydration mismatch
     * errors in production builds. Results in slightly larger bundles.
     * - **default:** `false`
     */
    prodHydrationMismatchDetails?: boolean
    /**
     * Customize the component ID generation strategy.
     * - `'filepath'`: hash the file path (relative to the project root)
     * - `'filepath-source'`: hash the file path and the source code
     * - `function`: custom function that takes the file path, source code,
     *   whether in production mode, and the default hash function as arguments
     * - **default:** `'filepath'` in development, `'filepath-source'` in production
     */
    componentIdGenerator?:
      | 'filepath'
      | 'filepath-source'
      | ((
          filepath: string,
          source: string,
          isProduction: boolean | undefined,
          getHash: (text: string) => string,
        ) => string)
  }

  // `script`, `template` and `style` are lower-level compiler options
  // to pass on to respective APIs of `vue/compiler-sfc`

  script?: Partial<
    Omit<
      SFCScriptCompileOptions,
      | 'id'
      | 'isProd'
      | 'inlineTemplate'
      | 'templateOptions'
      | 'sourceMap'
      | 'genDefaultAs'
      | 'customElement'
    >
  >

  template?: Partial<
    Omit<
      SFCTemplateCompileOptions,
      | 'id'
      | 'source'
      | 'ast'
      | 'filename'
      | 'scoped'
      | 'slotted'
      | 'isProd'
      | 'inMap'
      | 'ssr'
      | 'ssrCssVars'
      | 'preprocessLang'
    >
  >

  style?: Partial<
    Omit<
      SFCStyleCompileOptions,
      | 'filename'
      | 'id'
      | 'isProd'
      | 'source'
      | 'scoped'
      | 'cssDevSourcemap'
      | 'postcssOptions'
      | 'map'
      | 'postcssPlugins'
      | 'preprocessCustomRequire'
      | 'preprocessLang'
      | 'preprocessOptions'
    >
  >

  /**
   * Use custom compiler-sfc instance. Can be used to force a specific version.
   */
  compiler?: typeof _compiler

  /**
   * @deprecated moved to `features.customElement`.
   */
  customElements?: boolean | string | RegExp | (string | RegExp)[]
}

Asset URL handling

When @vitejs/plugin-vue compiles the <template> blocks in SFCs, it also converts any encountered asset URLs into ESM imports.

For example, the following template snippet:

<img src="../image.png" />

Is the same as:

<script setup>
import _imports_0 from '../image.png'
</script>

<img :src="_imports_0" />

By default the following tag/attribute combinations are transformed, and can be configured using the template.transformAssetUrls option.

{
  video: ['src', 'poster'],
  source: ['src'],
  img: ['src'],
  image: ['xlink:href', 'href'],
  use: ['xlink:href', 'href']
}

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:

import vue from '@vitejs/plugin-vue'

export default {
  plugins: [
    vue({
      template: {
        compilerOptions: {
          // ...
        },
        transformAssetUrls: {
          // ...
        },
      },
    }),
  ],
}

Example for transforming custom blocks

import vue from '@vitejs/plugin-vue'
import yaml from 'js-yaml'

const vueI18nPlugin = {
  name: 'vue-i18n',
  transform(code, id) {
    // if .vue file don't have <i18n> block, just return
    if (!/vue&type=i18n/.test(id)) {
      return
    }
    // parse yaml
    if (/\.ya?ml$/.test(id)) {
      code = JSON.stringify(yaml.load(code.trim()))
    }
    // mount the value on the i18n property of the component instance
    return `export default Comp => {
      Comp.i18n = ${code}
    }`
  },
}

export default {
  plugins: [vue(), vueI18nPlugin],
}

Create a file named Demo.vue, add lang="yaml" to the <i18n> blocks, then you can use the syntax of YAML:

<template>Hello</template>

<i18n lang="yaml">
message: 'world'
fullWord: 'hello world'
</i18n>

message is mounted on the i18n property of the component instance, you can use like this:

<script setup lang="ts">
import Demo from 'components/Demo.vue'
</script>…

Description from the npm listing.

  • vite
  • vite-plugin
  • 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

@vitejs/plugin-vue weekly downloads on npm, last 90 days: 16,546,724 weekly downloads as of Dec 5, 2026, +103% over 90 days.@vitejs/plugin-vueWeekly downloads on npm · Last 90 days16,546,724downloads / week+103% over 90 days02M4M6M8M10M12M14M16M18MSep 6Sep 21Oct 6Oct 21Nov 5Nov 20Dec 5downloads / weekobservedarchived (Internet Archive)no observationsSep 7, 2026 – Dec 5, 2026 · 90 observations · Updated Dec …pluginstats.com
@vitejs/plugin-vue weekly downloads on npm, last 90 days: 16,546,724 weekly downloads as of Dec 5, 2026, +103% over 90 days.

7/30/90-day growth

@vitejs/plugin-vue weekly downloads growth on npm: +8.9% over 7 days, +12.2% over 30 days, +103% over 90 days.@vitejs/plugin-vueWeekly downloads growth on npm16,546,724downloads / week now7-day growth+1,354,569 weekly downlo…+8.9%30-day growth+1,801,289 weekly downlo…+12.2%90-day growth+8,390,890 weekly downlo…+103%Growth vs. nearest observation to each baseline date · Updated Dec 5, 2026pluginstats.com
@vitejs/plugin-vue weekly downloads growth on npm: +8.9% over 7 days, +12.2% over 30 days, +103% over 90 days.

Ranking history

@vitejs/plugin-vue npm ranking history: currently #128 (by weekly downloads).@vitejs/plugin-vuenpm ranking · by weekly downloads · Last 90 days#128current rank#125#126#127#128#129#130#131Sep 7Sep 22Oct 7Oct 22Nov 6Nov 21Dec 6rankOct 18, 2026 – Dec 6, 2026 · 44 observations · Updated Dec 5, 2026pluginstats.com
@vitejs/plugin-vue npm ranking history: currently #128 (by weekly downloads).

Listing placement

All npm3,247 listings · 163 pages · 1,084 shown · page 7, #8 (overall #128)
All npm: every listing in weekly downloads order

Listing placement

Vite plugins300 listings · 15 pages · page 1, #2 (overall #2)
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 (170)
Recent weekly downloads observations for @vitejs/plugin-vue
Date (UTC)Weekly downloadsChange vs. previous
16,546,724+111.2K
16,435,527+344.1K
16,091,451+366.3K
15,725,196+188K
15,537,184+261.1K
15,276,062+65.2K
15,210,852+18.7K
15,192,155+8.6K
15,183,517-142K
15,325,513-219.2K
15,544,692-40.8K
15,585,447-35.8K
15,621,269-62.1K
15,683,337—

Similar npm Vite plugins plugins

All 20 @vitejs/plugin-vue 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/@vitejs/plugin-vue. First seen Oct 16, 2026; last successful collection Dec 6, 2026. See the methodology.