# @vitejs/plugin-vue [![npm](https://img.shields.io/npm/v/@vitejs/plugin-vue.svg)](https://npmjs.com/package/@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. ```js // vite.config.js import vue from '@vitejs/plugin-vue' export default { plugins: [vue()], } ``` For JSX / TSX support, [`@vitejs/plugin-vue-jsx`](https://github.com/vitejs/vite-plugin-vue/tree/main/packages/plugin-vue-jsx) is also needed. ## Options ```ts 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 } // `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 `