docs
evals
scenario-1
scenario-10
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
Build a small harness around the bundler dependency to launch a development server with hot reloading for a single-page sandbox.
src/index.html, reports the accessible URL, and responds over HTTP while watching for source changes. @testsrc/app.js after startup triggers hot replacement without restarting the server, with the served page reflecting the new content on refresh or HMR push. @testhost and port options when starting; uses them when available and surfaces a clear error if the port is unavailable instead of silently reassigning. @testexport type DevServerOptions = {
entry?: string;
host?: string;
port?: number;
https?: { certFile: string; keyFile: string } | false;
open?: boolean;
hmr?: boolean;
lazy?: { includes?: string[]; exclude?: string[] } | false;
};
export type DevServerHandle = {
url: string;
stop(): Promise<void>;
};
export function startDevServer(options?: DevServerOptions): Promise<DevServerHandle>;Provides the bundler, dev server, hot module replacement, HTTPS, and lazy-build support.