KC's Workspace
    Preparing search index...
    interface PreviewServer {
        config: ResolvedConfig;
        httpServer: HttpServer;
        middlewares: Server;
        resolvedUrls: ResolvedServerUrls | null;
        bindCLIShortcuts(options?: BindCLIShortcutsOptions<PreviewServer>): void;
        close(): Promise<void>;
        printUrls(): void;
    }
    Index

    Properties

    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

    https://github.com/senchalabs/connect#use-middleware

    resolvedUrls: ResolvedServerUrls | null

    The resolved urls Vite prints on the CLI (URL-encoded). Returns null if the server is not listening on any port.

    Methods