Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • PreviewServer

Index

Properties

config: Readonly<Omit<UserConfig, "plugins" | "css" | "assetsInclude" | "optimizeDeps" | "worker" | "build"> & { appType: AppType; base: string; build: ResolvedBuildOptions; cacheDir: string; command: "build" | "serve"; configFile: undefined | string; configFileDependencies: string[]; css: ResolvedCSSOptions; env: Record<string, any>; envDir: string; esbuild: false | ESBuildOptions; experimental: ExperimentalOptions; inlineConfig: InlineConfig; isProduction: boolean; isWorker: boolean; logger: Logger; mode: string; optimizeDeps: DepOptimizationOptions; plugins: readonly Plugin<any>[]; preview: ResolvedPreviewOptions; publicDir: string; resolve: Required<ResolveOptions> & { alias: Alias[] }; root: string; server: ResolvedServerOptions; ssr: ResolvedSSROptions; worker: ResolvedWorkerOptions; assetsInclude: any; createResolver: any } & PluginHookUtils>

The resolved vite config object

httpServer: HttpServer

native Node http server instance

middlewares: Server

A connect app instance.

  • Can be used to attach custom middlewares to the preview server.
  • Can also be used as the handler function of a custom http server or as a middleware in any connect-style Node.js frameworks
resolvedUrls: null | ResolvedServerUrls

The resolved urls Vite prints on the CLI. null before server is listening.

Methods

  • printUrls(): void
  • Print server urls

    Returns void