@vitejs/plugin-vue

  • Version 5.0.5
  • Published
  • 185 kB
  • No dependencies
  • MIT license

Install

npm i @vitejs/plugin-vue
yarn add @vitejs/plugin-vue
pnpm add @vitejs/plugin-vue

Overview

> 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.

Index

Functions

function parseVueRequest

parseVueRequest: (id: string) => { filename: string; query: VueQuery };

    function vuePlugin

    vuePlugin: (rawOptions?: Options) => Plugin<Api>;

      Interfaces

      interface Api

      interface Api {}

        property version

        version: string;

          index signature

          get options(): ResolvedOptions;

            index signature

            set options(value: ResolvedOptions);

              interface Options

              interface Options {}

                property compiler

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

                property customElement

                customElement?: boolean | string | RegExp | (string | RegExp)[];
                • Transform Vue SFCs into custom elements. - true: all *.vue imports are converted into custom elements - string | RegExp: matched files are converted into custom elements

                  /.ce.vue$/

                property exclude

                exclude?: string | RegExp | (string | RegExp)[];

                  property include

                  include?: string | RegExp | (string | RegExp)[];

                    property isProduction

                    isProduction?: boolean;

                      property script

                      script?: Partial<
                      Omit<
                      SFCScriptCompileOptions,
                      | 'id'
                      | 'isProd'
                      | 'inlineTemplate'
                      | 'templateOptions'
                      | 'sourceMap'
                      | 'genDefaultAs'
                      | 'customElement'
                      | 'defineModel'
                      >
                      > & {
                      /**
                      * @deprecated defineModel is now a stable feature and always enabled if
                      * using Vue 3.4 or above.
                      */
                      defineModel?: boolean;
                      };

                        property style

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

                          property template

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

                            interface ResolvedOptions

                            interface ResolvedOptions extends Options {}

                              property compiler

                              compiler: typeof _compiler;

                                property cssDevSourcemap

                                cssDevSourcemap: boolean;

                                  property devServer

                                  devServer?: ViteDevServer;

                                    property devToolsEnabled

                                    devToolsEnabled?: boolean;

                                      property root

                                      root: string;

                                        property sourceMap

                                        sourceMap: boolean;

                                          interface VueQuery

                                          interface VueQuery {}

                                            property id

                                            id?: string;

                                              property index

                                              index?: number;

                                                property lang

                                                lang?: string;

                                                  property raw

                                                  raw?: boolean;

                                                    property scoped

                                                    scoped?: boolean;

                                                      property src

                                                      src?: string;

                                                        property type

                                                        type?: 'script' | 'template' | 'style' | 'custom';

                                                          property url

                                                          url?: boolean;

                                                            property vue

                                                            vue?: boolean;

                                                              Package Files (1)

                                                              Dependencies (0)

                                                              No dependencies.

                                                              Dev Dependencies (8)

                                                              Peer Dependencies (2)

                                                              Badge

                                                              To add a badge like this onejsDocs.io badgeto your package's README, use the codes available below.

                                                              You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@vitejs/plugin-vue.

                                                              • Markdown
                                                                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/@vitejs/plugin-vue)
                                                              • HTML
                                                                <a href="https://www.jsdocs.io/package/@vitejs/plugin-vue"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>