webpack-dev-server

The official live-reloading development server for webpack, with hot module replacement, HTTPS, and proxying built in.

Tool
npm
v6.0.0
7,847stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
93/100Excellent
Development Activity96
Maintenance96
Community80
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
78/100Good
Architecture78
Code Quality92
Innovation62
Learning Curve80

webpack-dev-server is the official development server for webpack. It wraps webpack-dev-middleware to serve compiled assets straight from memory, then layers on a browser client (delivered over a WebSocket connection) that reloads the page or hot-swaps modules the instant a rebuild finishes. Most projects reach it through webpack serve on the webpack CLI rather than importing it directly, though it also exposes a programmatic Server class for custom setups.

Beyond the reload loop, it behaves like a small application server for the development phase: it can serve static assets from a directory, proxy API requests to a backend with http-proxy-middleware, terminate HTTPS with a self-signed or supplied certificate, broadcast itself on the local network via Bonjour/ZeroConf, and fall back to an index page for single-page-application routing. Every option is validated at startup against a bundled JSON schema, so misconfigurations fail fast with a clear error instead of a silent no-op.

Security is treated as a first-class concern rather than an afterthought: host-header and cross-origin checks run before any other middleware, and allowedHosts supports an explicit allowlist, auto (validate against the bound interfaces), or all (opt out entirely) for the cases where dev servers get proxied or tunneled. A full-screen browser overlay can be scoped independently to compilation errors, compilation warnings, and uncaught runtime errors, with an optional Trusted Types policy name for CSP-locked pages.

What You Get

  • In-memory asset serving via webpack-dev-middleware — no assets written to disk during development
  • Live reload and Hot Module Replacement (HMR) driven by a WebSocket connection between server and browser client
  • Configurable HTTP proxying to a backend API through http-proxy-middleware, including WebSocket-aware proxying
  • HTTPS support with auto-generated self-signed certificates or your own key/cert/CA/PFX
  • Static file serving with directory listing, custom public paths, and file watching for non-compiled assets
  • A full-screen error/warning overlay in the browser with independent toggles for compile errors, compile warnings, and runtime errors
  • Local network discovery via Bonjour/ZeroConf and a local-ip/local-ipv4/local-ipv6 host resolver
  • Built-in security middleware — host-header validation and cross-origin request checks ahead of the rest of the pipeline

Common Use Cases

  • Running a local dev environment for a webpack-based frontend with instant browser refresh on save
  • Developing a single-page application that needs HTML5 History API fallback so client-side routes resolve correctly
  • Proxying /api requests from the dev server to a separately-running backend during full-stack development
  • Testing HTTPS-only browser features (service workers, secure cookies, geolocation) locally with a self-signed certificate
  • Previewing a site on a phone or another device on the same network via the Bonjour-broadcast dev server

Under The Hood

Architecture The package centers on a single Server class (lib/Server.js) that takes a webpack Compiler/MultiCompiler and an options object, validates the options against a bundled JSON schema (lib/options.json) via schema-utils, and then runs a defined lifecycle: normalizeOptions resolves and defaults every option, initialize wires up the Express-based app, creates the underlying HTTP/HTTPS/HTTP2 server, and sets up file watching, and setupMiddlewares assembles an ordered middleware chain — starting with host-header and cross-origin security checks, then compression, static serving, history-API fallback, proxying, and the webpack-dev-middleware bridge itself. A parallel client-src/ tree holds the browser-side runtime (the WebSocket client, overlay, progress indicator, logger) which is transpiled separately with Babel and bundled with webpack before being injected into served pages, keeping the Node-side server and browser-side client as clearly separated concerns despite living in one repository.

Tech Stack Built on Node.js ESM with Express 5 as the HTTP layer, chokidar for filesystem watching, ws for the WebSocket transport between server and client, http-proxy-middleware for request proxying, bonjour-service for ZeroConf broadcasting, and selfsigned for on-the-fly HTTPS certificates. Public types are generated from JSDoc annotations via tsc --declaration --emitDeclarationOnly, and the CommonJS (dist/) and ESM (lib/) builds are produced separately with Babel so consumers can require or import the package interchangeably; webpack itself is an optional peer dependency, lazily imported only when actually needed.

Code Quality Tests run on Node’s built-in node:test runner (no separate test framework dependency) with the expect assertion library and jest-mock for spies/mocks, organized into test/server, test/client, test/cli, and test/e2e (browser-driven tests via Puppeteer), plus coverage collection through --experimental-test-coverage with an lcov reporter. Linting combines ESLint (typescript-eslint, import-order, jsdoc rules), Prettier formatting, and cspell spell-checking, all enforced pre-commit through Husky and lint-staged, with commitlint gating commit messages and changesets managing versioned releases — a comprehensive quality gate for a project of this maturity.

What Makes It Unique Rather than bundling a fixed web-socket implementation, the server abstracts the transport behind a pluggable webSocketServer option and a matching browser-side client contract, and the reload overlay itself is split into independently toggleable channels (compile errors, compile warnings, uncaught runtime errors) with support for a named Trusted Types policy — a level of granularity aimed squarely at CSP-restricted production-adjacent dev setups rather than the common case. Combined with the layered host-header/cross-origin security checks that run ahead of every other middleware, the project treats a dev server exposed on a local network as something that needs hardening by default, not just a convenience wrapper around static file serving.

Used by 38 apps in this directory

Python
50%
Other

Airbyte

Developer Tools · Data Engineering

21,998

Open-source ELT platform with 600+ connectors for moving data from any source to warehouses, lakes, and AI agents.

View details
95
Repo Health
80
Technical
66
Dependency
Built with
Python50%
Kotlin41%
Updated today
JavaScript
94%
MIT

Another Redis Desktop Manager

Developer Tools · Databases

34,729

Fast, stable Redis GUI with cluster, SSH, and massive key support

View details
83
Repo Health
56
Technical
67
Dependency
Built with
JavaScript94%
Updated 2 weeks ago
TypeScript
68%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,825

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
93
Repo Health
79
Technical
66
Dependency
Built with
TypeScript68%
Java21%
Updated 3 days ago
Go
85%
Apache 2.0

Argo Workflows

Devops · Data Engineering

16,956

The most popular Kubernetes-native workflow engine for orchestrating containerized DAGs, ML pipelines, CI/CD, and parallel batch jobs at scale.

View details
96
Repo Health
90
Technical
67
Dependency
Built with
Go85%
TypeScript11%
Updated yesterday
JavaScript
90%
Other

CodeSandbox

Code Editors · Developer Tools

13,640

Instantly ready browser-based IDE that runs full npm dependency resolution and transpilation entirely client-side, with no server needed.

View details
69
Repo Health
76
Technical
62
Dependency
Built with
JavaScript90%
Updated 1 weeks ago
PHP
78%
Other

Craft CMS

CMS

3,605

A developer-first PHP CMS with clean-slate content modeling, auto-generated GraphQL API, and a four-tier edition system that scales from solo projects to enterprise deployments.

View details
96
Repo Health
83
Technical
62
Dependency
Built with
PHP78%
JavaScript14%
Updated yesterday
Ruby
40%
AGPL 3.0

DocuSeal

Digital Signiture

18,446

Open source document signing platform with WYSIWYG PDF builder, multi-party workflows, REST API, and full self-hosting via Docker.

View details
87
Repo Health
80
Technical
68
Dependency
Built with
Ruby40%
Vue28%
HTML20%
Updated 1 weeks ago
TypeScript
94%
AGPL 3.0

Element Web

Team Chat · Collaboration

13,437

A polished, self-hostable Matrix client for secure, decentralized messaging and collaboration that puts your organization in full control of its data.

View details
96
Repo Health
83
Technical
65
Dependency
Built with
TypeScript94%
Updated yesterday
TypeScript
54%
Other

Focalboard

Productivity · Project Management · Collaboration

26,448

Self-hosted, open source project management with Kanban, table, gallery, and calendar views — a privacy-first alternative to Trello, Notion, and Asana.

View details
57
Repo Health
82
Technical
64
Dependency
Built with
TypeScript54%
Go40%
Updated 3 months ago

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search