///
import { AddressInfo } from 'net';
import * as express from 'express';
import { Chunk, Configuration } from 'webpack';
export interface ServerOptions {
router?(app: express.Express): void;
webpackConfig?: Configuration;
compileInMemory?: boolean;
}
interface ServerConnectionInfo {
port: number;
host: string;
url: string;
family: AddressInfo['family'];
}
interface PageOptions {
title?: string;
markup?: string;
}
interface PageContext {
previewUrl: string;
}
export declare class PreviewServer {
private options;
private baseWebpackConfig;
private memoryFs;
private app;
private connection;
private cache;
private pages;
private log;
connectionInfo: ServerConnectionInfo | null;
setOption(name: Name, value: ServerOptions[Name]): void;
constructor(options?: ServerOptions);
private initSettings;
listen(port?: number, host?: string): Promise;
compile(entryPath?: string): Promise>;
private createPreviewUrl;
createContext(entryPath: string, options: PageOptions): PageContext;
use(middleware: (app: express.Express) => void): () => void;
close(): Promise;
private applyMiddleware;
private applyContentBaseMiddleware;
private applyMemoryFsMiddleware;
private applyRoutes;
private renderHtml;
}
export {};