import { Plugin, ViteDevServer } from "vite"; import * as _compiler from "vue/compiler-sfc"; import { SFCScriptCompileOptions, SFCStyleCompileOptions, SFCTemplateCompileOptions } from "vue/compiler-sfc"; //#region src/utils/query.d.ts interface VueQuery { vue?: boolean; src?: string; type?: 'script' | 'template' | 'style' | 'custom'; index?: number; lang?: string; raw?: boolean; url?: boolean; scoped?: boolean; id?: string; } declare function parseVueRequest(id: string): { filename: string; query: VueQuery; }; //#endregion //#region src/index.d.ts interface Options { include?: string | RegExp | (string | RegExp)[]; exclude?: string | RegExp | (string | RegExp)[]; /** * In Vite, this option follows Vite's config. */ isProduction?: boolean; script?: Partial> & { /** * @deprecated defineModel is now a stable feature and always enabled if * using Vue 3.4 or above. */ defineModel?: boolean; /** * @deprecated moved to `features.propsDestructure`. */ propsDestructure?: boolean; }; template?: Partial>; style?: Partial>; /** * Use custom compiler-sfc instance. Can be used to force a specific version. */ compiler?: typeof _compiler; /** * 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)[]; /** * Force all