import { TSConfig } from "pkg-types"; import { BuiltinPresetName, Unimport } from "unimport"; import { AppConfig, KeepAliveProps, TransitionProps } from "vue"; import { Plugin, ServerOptions, UserConfig, ViteDevServer } from "vite"; import { Compiler, Configuration, Stats, WebpackError, WebpackPluginInstance } from "webpack"; import { Options } from "@vitejs/plugin-vue"; import { Options as Options$1 } from "@vitejs/plugin-vue-jsx"; import { InputObject, Schema, SchemaDefinition, SchemaDefinition as SchemaDefinition$1 } from "untyped"; import { RouteLocationNormalizedGeneric, RouteLocationRaw, RouteRecordRaw, RouterHistory, RouterOptions } from "vue-router"; import { IncomingMessage, Server, ServerResponse } from "node:http"; import { AssetURLTagConfig } from "@vue/compiler-sfc"; import { CompilerOptions } from "@vue/compiler-core"; import { AriaAttributes, DataKeys, GlobalAttributes, RenderSSRHeadOptions, SerializableHead } from "@unhead/vue/types"; import { UnheadVueViteOptions } from "@unhead/vue/vite"; import { BundleAnalyzerPlugin } from "webpack-bundle-analyzer"; import { PluginVisualizerOptions } from "rollup-plugin-visualizer"; import { TransformerOptions } from "unctx/transform"; import { CompatibilityDateSpec } from "compatx"; import { ChokidarOptions } from "chokidar"; import { CorsOptions, H3CorsOptions } from "h3"; import { Options as Options$2 } from "autoprefixer"; import { Options as Options$3 } from "cssnano"; import { RawVueCompilerOptions } from "@vue/language-core"; import { PluginOptions } from "mini-css-extract-plugin"; import { LoaderOptions } from "esbuild-loader"; import { Options as Options$4 } from "pug"; import { VueLoaderOptions } from "vue-loader"; import { BasePluginOptions, DefinedDefaultMinimizerAndOptions } from "css-minimizer-webpack-plugin"; import { ProcessOptions } from "postcss"; import { Options as Options$5 } from "webpack-dev-middleware"; import { ClientOptions, MiddlewareOptions } from "webpack-hot-middleware"; import { TransformOptions } from "oxc-transform"; import { TransformOptions as TransformOptions$1 } from "esbuild"; import { Server as Server$1 } from "node:https"; import { AsyncLocalStorage } from "node:async_hooks"; //#region src/types/imports.d.ts /** * Names of the auto-import presets shipped by `unimport`, such as `'vue'` or `'vue-router'`. * * The list belongs to `unimport`, which is handed `imports.presets` unchanged, so it is * re-exported rather than reimplemented: a name Nuxt made up would be a name that resolves to * nothing at build time. */ type NuxtImportPresetName = BuiltinPresetName; /** How an auto-imported binding is declared in generated type declarations. */ type NuxtImportDeclarationType = "let" | "var" | "const" | "enum" | "const enum" | "class" | "function" | "async function"; /** Options shared between a single auto-import and a preset of auto-imports. */ interface NuxtImportCommon { /** Module specifier the import is resolved from. */ from: string; /** * Priority of the import. Where two imports share a name, the higher priority wins. * @default 1 */ priority?: number; /** Whether this import is disabled. */ disabled?: boolean; /** Whether to omit this import from generated type declarations. */ dtsDisabled?: boolean; /** How the binding is declared in generated type declarations. */ declarationType?: NuxtImportDeclarationType; meta?: { /** Short description of the import, shown in editor tooling. */ description?: string; /** URL to documentation for the import. */ docsUrl?: string; [key: string]: any; }; /** Whether this import is a type-only import. */ type?: boolean; /** Module specifier to use in generated type declarations, if it differs from `from`. */ typeFrom?: string; } /** A single auto-imported binding. */ interface NuxtImport extends NuxtImportCommon { /** Name of the export to import. */ name: string; /** Name to make the export available as, if it differs from `name`. */ as?: string; /** Import attributes. Ignored for CommonJS output. */ with?: Record; } /** * An entry in a preset's `imports`: an export name, a `[name, as?, from?]` tuple, or a full * import without `from` (which is inherited from the preset). */ type NuxtImportEntry = Omit | string | [name: string, as?: string, from?: string]; /** A set of auto-imports declared inline, sharing a module specifier and options. */ interface NuxtImportPreset extends NuxtImportCommon { imports: (NuxtImportEntry | NuxtImportPreset)[]; } /** A set of auto-imports derived by scanning a package's exports. */ interface NuxtPackageImportPreset { /** Name of the package to scan. */ package: string; /** * Path to resolve the package from. * @default process.cwd() */ url?: string; /** Names to exclude from the scanned exports. */ ignore?: (string | RegExp | ((name: string) => boolean))[]; /** * Use a cached scan of the package, if one is available. * @default true */ cache?: boolean; } /** A source of auto-imports: either declared inline, or scanned from a package. */ type NuxtImportPresetSource = NuxtImportPreset | NuxtPackageImportPreset; /** A directory to scan for auto-imports, with per-directory options. */ interface NuxtImportScanDir { /** Glob pattern matching the directory to scan. */ glob: string; /** * Register type exports found in the directory. * @default true */ types?: boolean; } /** Options for scanning directories for auto-imports. */ interface NuxtImportScanOptions { /** * Glob patterns matching files to scan. * @default ['*.{ts,js,mjs,cjs,mts,cts,tsx,jsx}'] */ filePatterns?: string[]; /** Filter the scanned files. */ fileFilter?: (file: string) => boolean; /** * Register type exports. * @default true */ types?: boolean; /** * Directory to resolve `filePatterns` against. * @default process.cwd() */ cwd?: string; } /** * Addons extending how auto-imports are injected. * * The addon protocol belongs to the transformer Nuxt uses internally, so entries in `addons` * are not typed here. */ interface NuxtImportAddonsOptions { addons?: any[]; /** * Auto-import inside Vue SFC `