Create a new DevServer instance
The current working directory URL
Development server configuration options
Script file to start the development server
The current working directory URL
Development server configuration options including hooks and environment variables
CLI UI instance to log colorful messages and progress information
CLI UI instance to log colorful messages and progress information
The mode in which the DevServer is running.
Add listener to get notified when dev server is closed
Function to call when dev server closes
This DevServer instance for method chaining
Add listener to get notified when dev server encounters an error
Function to call when dev server encounters an error
This DevServer instance for method chaining
Close watchers and the running child process
Start the development server in static or HMR mode
TypeScript module reference
Start the development server in watch mode and restart on file changes
TypeScript module reference
Optionaloptions: { poll: boolean }Watch options including polling mode
Exposes the API to start the development server in HMR, watch or static mode.
In HMR mode, the DevServer will exec the "bin/server.ts" file and let hot-hook manage the changes using hot module reloading.
In watch mode, the DevServer will start an internal watcher and restarts the after every file change. The files must be part of the TypeScript project (via tsconfig.json), or registered as metaFiles.
Example