A dev server is a local HTTP server optimized for the development loop. Its job is to serve your application locally with features that make iteration fast.
- Hot Module Replacement (HMR) — when you save a file, only the changed module is swapped in the browser without a full page reload. State (like form inputs, scroll position) is preserved.
- On-demand transformation — instead of bundling everything upfront, modules are transformed (TypeScript → JS, JSX → JS, etc.) only when the browser requests them. This makes startup near-instant even for large projects.
- File watching — monitors the filesystem and triggers rebuilds/HMR updates.
- Error overlay — compilation errors are shown directly in the browser.