Full Code of webpack/webpack-dev-server for AI

main b550a702bd42 cached
519 files
1.7 MB
459.7k tokens
235 symbols
1 requests
Download .txt
Showing preview only (1,913K chars total). Download the full file or copy to clipboard to get everything.
Repository: webpack/webpack-dev-server
Branch: main
Commit: b550a702bd42
Files: 519
Total size: 1.7 MB

Directory structure:
gitextract_0seghhx2/

├── .cspell.json
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── dependency-review.yml
│       └── nodejs.yml
├── .gitignore
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .prettierignore
├── .versionrc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DOCUMENTATION-v4.md
├── LICENSE
├── README.md
├── babel.config.js
├── bin/
│   ├── cli-flags.js
│   └── webpack-dev-server.js
├── client-src/
│   ├── clients/
│   │   ├── SockJSClient.js
│   │   └── WebSocketClient.js
│   ├── globals.d.ts
│   ├── index.js
│   ├── modules/
│   │   ├── logger/
│   │   │   ├── index.js
│   │   │   └── tapable.js
│   │   └── sockjs-client/
│   │       └── index.js
│   ├── overlay.js
│   ├── progress.js
│   ├── socket.js
│   ├── utils/
│   │   ├── log.js
│   │   └── sendMessage.js
│   └── webpack.config.js
├── commitlint.config.js
├── eslint.config.mjs
├── examples/
│   ├── .assets/
│   │   ├── layout.html
│   │   └── style.css
│   ├── README.md
│   ├── api/
│   │   ├── internal-ip/
│   │   │   ├── README.md
│   │   │   └── app.js
│   │   ├── internal-ip-sync/
│   │   │   ├── README.md
│   │   │   └── app.js
│   │   ├── middleware/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── simple/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── start/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── start-callback/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── stop/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   └── stop-callback/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── server.js
│   │       └── webpack.config.js
│   ├── app/
│   │   ├── connect/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── hono/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── ssl/
│   │       │   ├── localhost-cert.pem
│   │       │   └── localhost-privkey.pem
│   │       └── webpack.config.js
│   ├── bonjour/
│   │   ├── boolean/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── object/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── client/
│   │   ├── logging/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── overlay/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── create-button.js
│   │   │   └── webpack.config.js
│   │   ├── progress/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── reconnect/
│   │   │   ├── false/
│   │   │   │   ├── README.md
│   │   │   │   ├── app.js
│   │   │   │   └── webpack.config.js
│   │   │   ├── number/
│   │   │   │   ├── README.md
│   │   │   │   ├── app.js
│   │   │   │   └── webpack.config.js
│   │   │   └── true/
│   │   │       ├── README.md
│   │   │       ├── app.js
│   │   │       └── webpack.config.js
│   │   ├── trusted-types-overlay/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── layout.html
│   │   │   └── webpack.config.js
│   │   └── web-socket-url/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── index.html
│   │       └── webpack.config.js
│   ├── compression/
│   │   ├── false/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── true/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── default/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── style.less
│   │   └── webpack.config.js
│   ├── dev-middleware/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── general/
│   │   ├── config-array/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── style.less
│   │   │   └── webpack.config.js
│   │   ├── config-promise/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── proxy-advanced/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── bypass.html
│   │   │   └── webpack.config.js
│   │   ├── proxy-hot-reload/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── proxy-config.js
│   │   │   └── webpack.config.js
│   │   ├── proxy-simple/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── universal-config/
│   │   │   ├── README.md
│   │   │   ├── client.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   └── webworker/
│   │       ├── README.md
│   │       ├── web.js
│   │       ├── webpack.config.js
│   │       └── worker.js
│   ├── headers/
│   │   ├── array/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── function/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── object/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── history-api-fallback/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── file.txt
│   │   └── webpack.config.js
│   ├── hmr/
│   │   ├── boolean/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── example.js
│   │   │   └── webpack.config.js
│   │   └── only/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── example.js
│   │       └── webpack.config.js
│   ├── host-and-port/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── ipc/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── multi-compiler/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── node-false/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── on-listening/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── open-target/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── open-target-multiple/
│   │   ├── README.md
│   │   ├── app1.js
│   │   ├── app2.js
│   │   └── webpack.config.js
│   ├── proxy/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── server/
│   │   ├── http2/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── https/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── ssl/
│   │   │   │   ├── ca.pem
│   │   │   │   ├── server.crt
│   │   │   │   ├── server.key
│   │   │   │   └── server.pfx
│   │   │   └── webpack.config.js
│   │   └── spdy/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── ssl/
│   │       │   ├── ca.pem
│   │       │   ├── server.crt
│   │       │   ├── server.key
│   │       │   └── server.pfx
│   │       └── webpack.config.js
│   ├── setup-middlewares/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── util.js
│   ├── watch-static/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── assets/
│   │   │   └── index.html
│   │   ├── css/
│   │   │   └── styles.css
│   │   └── webpack.config.js
│   └── web-socket-server/
│       ├── sockjs/
│       │   ├── README.md
│       │   ├── app.js
│       │   └── webpack.config.js
│       └── ws/
│           ├── README.md
│           ├── app.js
│           └── webpack.config.js
├── jest.config.js
├── lib/
│   ├── Server.js
│   ├── getPort.js
│   ├── options.json
│   └── servers/
│       ├── BaseServer.js
│       ├── SockJSServer.js
│       └── WebsocketServer.js
├── lint-staged.config.js
├── migration-v4.md
├── migration-v5.md
├── package.json
├── scripts/
│   ├── extend-webpack-types.js
│   ├── globalSetupTest.js
│   ├── prepare-test-for-old-node.js
│   └── setupTest.js
├── test/
│   ├── __snapshots__/
│   │   ├── normalize-options.test.js.snap.webpack5
│   │   └── validate-options.test.js.snap.webpack5
│   ├── cli/
│   │   ├── __snapshots__/
│   │   │   ├── basic.test.js.snap.webpack5
│   │   │   ├── bonjour-option.test.js.snap.webpack5
│   │   │   ├── colors.test.js.snap.webpack5
│   │   │   ├── historyApiFallback-option.test.js.snap.webpack5
│   │   │   ├── host-option.test.js.snap.webpack5
│   │   │   ├── ipc-option.test.js.snap.webpack5
│   │   │   ├── port-option.test.js.snap.webpack5
│   │   │   ├── server-option.test.js.snap.webpack5
│   │   │   ├── static-option.test.js.snap.webpack5
│   │   │   └── watchFiles-option.test.js.snap.webpack5
│   │   ├── allowedHosts-option.test.js
│   │   ├── basic.test.js
│   │   ├── bonjour-option.test.js
│   │   ├── client-option.test.js
│   │   ├── colors.test.js
│   │   ├── compress-option.test.js
│   │   ├── historyApiFallback-option.test.js
│   │   ├── host-option.test.js
│   │   ├── hot-option.test.js
│   │   ├── ipc-option.test.js
│   │   ├── liveReload-option.test.js
│   │   ├── open-option.test.js
│   │   ├── port-option.test.js
│   │   ├── server-option.test.js
│   │   ├── static-option.test.js
│   │   ├── watchFiles-option.test.js
│   │   └── webSocketServer-option.test.js
│   ├── client/
│   │   ├── ReactErrorBoundary.test.js
│   │   ├── __snapshots__/
│   │   │   ├── index.test.js.snap.webpack5
│   │   │   └── socket-helper.test.js.snap.webpack5
│   │   ├── bundle.test.js
│   │   ├── clients/
│   │   │   ├── SockJSClient.test.js
│   │   │   ├── WebsocketClient.test.js
│   │   │   └── __snapshots__/
│   │   │       ├── SockJSClient.test.js.snap.webpack5
│   │   │       └── WebsocketClient.test.js.snap.webpack5
│   │   ├── index.test.js
│   │   ├── socket-helper.test.js
│   │   └── utils/
│   │       ├── __snapshots__/
│   │       │   ├── getCurrentScriptSource.test.js.snap.webpack5
│   │       │   ├── log.test.js.snap.webpack5
│   │       │   ├── reloadApp.test.js.snap.webpack5
│   │       │   └── sendMessage.test.js.snap.webpack5
│   │       ├── createSocketURL.test.js
│   │       ├── getCurrentScriptSource.test.js
│   │       ├── log.test.js
│   │       └── sendMessage.test.js
│   ├── e2e/
│   │   ├── __snapshots__/
│   │   │   ├── allowed-hosts.test.js.snap.webpack5
│   │   │   ├── api.test.js.snap.webpack5
│   │   │   ├── bonjour.test.js.snap.webpack5
│   │   │   ├── built-in-routes.test.js.snap.webpack5
│   │   │   ├── client-reconnect.test.js.snap.webpack5
│   │   │   ├── client.test.js.snap.webpack5
│   │   │   ├── compress.test.js.snap.webpack5
│   │   │   ├── entry.test.js.snap.webpack5
│   │   │   ├── headers.test.js.snap.webpack5
│   │   │   ├── history-api-fallback.test.js.snap.webpack5
│   │   │   ├── host.test.js.snap.webpack5
│   │   │   ├── hot-and-live-reload.test.js.snap.webpack5
│   │   │   ├── ipc.test.js.snap.webpack5
│   │   │   ├── logging.test.js.snap.webpack5
│   │   │   ├── mime-types.test.js.snap.webpack5
│   │   │   ├── module-federation.test.js.snap.webpack5
│   │   │   ├── multi-compiler.test.js.snap.webpack5
│   │   │   ├── on-listening.test.js.snap.webpack5
│   │   │   ├── overlay.test.js.snap.webpack5
│   │   │   ├── port.test.js.snap.webpack5
│   │   │   ├── server-and-client-transport.test.js.snap.webpack5
│   │   │   ├── server.test.js.snap.webpack5
│   │   │   ├── setup-exit-signals.test.js.snap.webpack5
│   │   │   ├── setup-middlewares.test.js.snap.webpack5
│   │   │   ├── static-directory.test.js.snap.webpack5
│   │   │   ├── static-public-path.test.js.snap.webpack5
│   │   │   ├── stats.test.js.snap.webpack5
│   │   │   ├── target.test.js.snap.webpack5
│   │   │   ├── watch-files.test.js.snap.webpack5
│   │   │   ├── web-socket-communication.test.js.snap.webpack5
│   │   │   ├── web-socket-server-url.test.js.snap.webpack5
│   │   │   └── web-socket-server.test.js.snap.webpack5
│   │   ├── allowed-hosts.test.js
│   │   ├── api.test.js
│   │   ├── app.test.js
│   │   ├── bonjour.test.js
│   │   ├── built-in-routes.test.js
│   │   ├── client-reconnect.test.js
│   │   ├── client.test.js
│   │   ├── compress.test.js
│   │   ├── cross-origin-request.test.js
│   │   ├── entry.test.js
│   │   ├── headers.test.js
│   │   ├── history-api-fallback.test.js
│   │   ├── host.test.js
│   │   ├── hot-and-live-reload.test.js
│   │   ├── ipc.test.js
│   │   ├── lazy-compilation.test.js
│   │   ├── logging.test.js
│   │   ├── mime-types.test.js
│   │   ├── module-federation.test.js
│   │   ├── multi-compiler.test.js
│   │   ├── on-listening.test.js
│   │   ├── options-middleware.test.js
│   │   ├── overlay.test.js
│   │   ├── port.test.js
│   │   ├── progress.test.js
│   │   ├── range-header.test.js
│   │   ├── server-and-client-transport.test.js
│   │   ├── server.test.js
│   │   ├── setup-exit-signals.test.js
│   │   ├── setup-middlewares.test.js
│   │   ├── static-directory.test.js
│   │   ├── static-public-path.test.js
│   │   ├── stats.test.js
│   │   ├── target.test.js
│   │   ├── watch-files.test.js
│   │   ├── web-socket-communication.test.js
│   │   ├── web-socket-server-url.test.js
│   │   └── web-socket-server.test.js
│   ├── fixtures/
│   │   ├── cli/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-default-stats/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-disabled/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-enabled/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-empty-entry/
│   │   │   └── webpack.config.js
│   │   ├── cli-entry-as-descriptor/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-multi-entry/
│   │   │   ├── bar.js
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-promise-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-single-entry/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-target-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-universal-compiler-config/
│   │   │   ├── client.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── client-config/
│   │   │   ├── bar.js
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   ├── static/
│   │   │   │   └── foo.txt
│   │   │   └── webpack.config.js
│   │   ├── custom-client/
│   │   │   ├── CustomClientEntry.js
│   │   │   ├── CustomClientHotEntry.js
│   │   │   └── CustomSockJSClient.js
│   │   ├── dev-public-path/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── dev-server/
│   │   │   ├── bar.js
│   │   │   ├── client-custom-path-config.js
│   │   │   ├── client-default-path-config.js
│   │   │   └── foo.js
│   │   ├── entry-as-function/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-2-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── other.html
│   │   │   ├── random-file.txt
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-3-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── https-certificate/
│   │   │   ├── ca.pem
│   │   │   ├── server.crt
│   │   │   ├── server.key
│   │   │   └── server.pfx
│   │   ├── lazy-compilation-multiple-entries/
│   │   │   ├── one.js
│   │   │   ├── two.js
│   │   │   └── webpack.config.js
│   │   ├── lazy-compilation-single-entry/
│   │   │   ├── entry.js
│   │   │   └── webpack.config.js
│   │   ├── mime-types-config/
│   │   │   ├── file.custom
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── module-federation-config/
│   │   │   ├── entry1.js
│   │   │   ├── entry2.js
│   │   │   ├── webpack.config.js
│   │   │   ├── webpack.multi.config.js
│   │   │   ├── webpack.object-entry.config.js
│   │   │   └── webpack.plugin.js
│   │   ├── multi-compiler-one-configuration/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── multi-compiler-two-configurations/
│   │   │   ├── one.js
│   │   │   ├── two.js
│   │   │   └── webpack.config.js
│   │   ├── multi-public-path-config/
│   │   │   ├── bar.js
│   │   │   ├── baz.js
│   │   │   ├── foo.js
│   │   │   ├── test.html
│   │   │   └── webpack.config.js
│   │   ├── overlay-config/
│   │   │   ├── foo.js
│   │   │   ├── trusted-types.webpack.config.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-custom/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-default/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-sockjs-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-ws-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── proxy-config/
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── reload-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── reload-config-2/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── schema/
│   │   │   └── webpack.config.simple.js
│   │   ├── simple-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── simple-config-other/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── ssl/
│   │   │   ├── localhost-cert.pem
│   │   │   └── localhost-privkey.pem
│   │   ├── static/
│   │   │   ├── foo.js
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── static-config/
│   │   │   ├── foo.js
│   │   │   ├── other/
│   │   │   │   └── foo.html
│   │   │   ├── public/
│   │   │   │   ├── assets/
│   │   │   │   │   ├── example.txt
│   │   │   │   │   └── other.txt
│   │   │   │   ├── bar/
│   │   │   │   │   └── index.html
│   │   │   │   ├── foo.wasm
│   │   │   │   ├── index.html
│   │   │   │   ├── node_modules/
│   │   │   │   │   └── .gitkeep
│   │   │   │   └── other.html
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── universal-compiler-config/
│   │   │   ├── browser.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── watch-files-config/
│   │   │   ├── foo.js
│   │   │   ├── other/
│   │   │   │   └── foo.html
│   │   │   ├── public/
│   │   │   │   ├── assets/
│   │   │   │   │   ├── example.txt
│   │   │   │   │   └── other.txt
│   │   │   │   ├── bar/
│   │   │   │   │   └── index.html
│   │   │   │   └── other.html
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── worker-config/
│   │   │   ├── index.js
│   │   │   ├── webpack.config.js
│   │   │   └── worker.js
│   │   └── worker-config-dev-server-false/
│   │       ├── index.js
│   │       ├── webpack.config.js
│   │       └── worker.js
│   ├── helpers/
│   │   ├── ExitOnDonePlugin.js
│   │   ├── conditional-test.js
│   │   ├── custom-http.js
│   │   ├── html-generator-plugin.js
│   │   ├── normalize-options.js
│   │   ├── puppeteer-constants.js
│   │   ├── run-browser.js
│   │   ├── session-subscribe.js
│   │   ├── snapshotResolver.js
│   │   ├── test-bin.js
│   │   ├── test-server.js
│   │   └── trusted-types-html-generator-plugin.js
│   ├── normalize-options.test.js
│   ├── ports-map.js
│   ├── server/
│   │   ├── open-option.test.js
│   │   └── proxy-option.test.js
│   └── validate-options.test.js
├── tsconfig.client.json
├── tsconfig.json
└── types/
    ├── bin/
    │   ├── cli-flags.d.ts
    │   └── webpack-dev-server.d.ts
    └── lib/
        ├── Server.d.ts
        ├── getPort.d.ts
        └── servers/
            ├── BaseServer.d.ts
            ├── SockJSServer.d.ts
            └── WebsocketServer.d.ts

================================================
FILE CONTENTS
================================================

================================================
FILE: .cspell.json
================================================
{
  "version": "0.2",
  "language": "en,en-gb",
  "words": [
    "apos",
    "camelcase",
    "tapable",
    "sockjs",
    "spdy",
    "memfs",
    "execa",
    "networkidle",
    "ipaddr",
    "pageerror",
    "unmock",
    "testhost",
    "USEPOLLING",
    "colorette",
    "selfsigned",
    "portfinder",
    "xlink",
    "instanceof",
    "Heyo",
    "domcontentloaded",
    "historyapifallback",
    "pems",
    "localdomain",
    "unshift",
    "Zeroconf",
    "webworker",
    "devserver",
    "logspam",
    "Sindre",
    "Sorhus",
    "esmodules",
    "CAFC",
    "FACCA",
    "darkgrey",
    "Consolas",
    "peerigon",
    "Ichigo",
    "Kurosaki",
    "typeof",
    "parseable",
    "proxyfalse",
    "klona",
    "sessionattached",
    "zenitsu",
    "chuntaro",
    "nwjs",
    "myhost",
    "ƕrrn",
    "Fƅsq",
    "G'RД",
    "ECONNREFUSED",
    "taskkill",
    "testhouse",
    "mwarn",
    "mansi",
    "nosources",
    "Heyyy",
    "oipqj",
    "breakpad",
    "infobars",
    "omnibox",
    "swiftshader",
    "hoge",
    "subsubcomain",
    "noselect",
    "commitlint",
    "eslintcache",
    "hono",
    "privkey",
    "geomanist",
    "nodenext"
  ],
  "ignorePaths": [
    "CHANGELOG.md",
    "coverage",
    "package.json",
    "dist/**",
    "client/**",
    "**/__snapshots__/**",
    "package-lock.json",
    "node_modules",
    "coverage",
    "*.log"
  ]
}


================================================
FILE: .editorconfig
================================================
# editorconfig.org

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true

[*.md]
insert_final_newline = false
trim_trailing_whitespace = false


================================================
FILE: .gitattributes
================================================
* text=auto
bin/* eol=lf


================================================
FILE: .github/dependabot.yml
================================================
version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: daily
      time: "04:00"
      timezone: Europe/Berlin
    open-pull-requests-limit: 10
    versioning-strategy: lockfile-only
    groups:
      dependencies:
        patterns:
          - "*"


================================================
FILE: .github/workflows/dependency-review.yml
================================================
name: "Dependency Review"
on: [pull_request]

permissions:
  contents: read

jobs:
  dependency-review:
    runs-on: ubuntu-latest
    steps:
      - name: "Checkout Repository"
        uses: actions/checkout@v4
      - name: "Dependency Review"
        uses: actions/dependency-review-action@v4


================================================
FILE: .github/workflows/nodejs.yml
================================================
name: webpack-dev-server

on:
  push:
    branches:
      - main
      - next
      - v4
  pull_request:
    branches:
      - main
      - next
      - v4

permissions:
  contents: read

jobs:
  lint:
    name: Lint - ${{ matrix.os }} - Node v${{ matrix.node-version }}

    env:
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

    strategy:
      matrix:
        os: [ubuntu-latest]
        node-version: [lts/*]

    runs-on: ${{ matrix.os }}

    concurrency:
      group: lint-${{ matrix.os }}-v${{ matrix.node-version }}-${{ github.ref }}
      cancel-in-progress: true

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Lint
        run: npm run lint

      - name: Build types
        run: npm run build:types

      - name: Check types
        run: if [ -n "$(git status types --porcelain)" ]; then echo "Missing types. Update types by running 'npm run build:types'"; exit 1; else echo "All types are valid"; fi

      - name: Security audit
        run: npm audit --production

      - name: Validate PR commits with commitlint
        if: github.event_name == 'pull_request'
        run: npx commitlint --from ${{ github.event.pull_request.head.sha }}~${{ github.event.pull_request.commits }} --to ${{ github.event.pull_request.head.sha }} --verbose

  test:
    name: Test - ${{ matrix.os }} - Node v${{ matrix.node-version }}, Webpack ${{ matrix.webpack-version }} (${{ matrix.shard }})

    strategy:
      matrix:
        os: [ubuntu-latest, windows-latest, macos-latest]
        node-version: [18.x, 20.x, 22.x, 24.x]
        shard: ["1/4", "2/4", "3/4", "4/4"]
        webpack-version: [latest]

    runs-on: ${{ matrix.os }}

    concurrency:
      group: test-${{ matrix.os }}-v${{ matrix.node-version }}-${{ matrix.webpack-version }}-${{ matrix.shard }}-${{ github.ref }}
      cancel-in-progress: true

    steps:
      - uses: actions/checkout@v4

      - name: Use Node.js ${{ matrix.node-version }}
        uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
          cache: "npm"

      - name: Install dependencies
        run: npm ci

      - name: Install dependencies for Node.js@18
        run: |
          npm i p-retry@^4.5.0 open@^8.0.9
          node ./scripts/prepare-test-for-old-node.js
        if: matrix.node-version == '18.x'

      - name: Setup firefox
        if: matrix.os != 'windows-latest'
        uses: browser-actions/setup-firefox@latest
        with:
          firefox-version: latest

      - name: Link webpack-dev-server
        run: |
          cp -R client tmp-client
          npm link --ignore-scripts || true
          npm link webpack-dev-server --ignore-scripts || true
          rm -r client
          cp -R tmp-client client

      - name: Run tests for webpack version ${{ matrix.webpack-version }}
        run: node_modules/.bin/jest --coverage --ci --shard=${{ matrix.shard }}
        if: matrix.node-version == '18.x'

      - name: Run tests for webpack version ${{ matrix.webpack-version }}
        run: npm run test:coverage -- --ci --shard=${{ matrix.shard }}
        if: matrix.node-version != '18.x'

      - name: Submit coverage data to codecov
        uses: codecov/codecov-action@v5
        with:
          token: ${{ secrets.CODECOV_TOKEN }}


================================================
FILE: .gitignore
================================================
.DS_Store

npm-debug.log

.idea

client
!/examples/client
!/test/client
coverage
node_modules
.vscode
yarn.lock
yarn-error.log

.eslintcache
.cspellcache

test/fixtures/static-config/public/assets/non-exist.txt
test/fixtures/watch-files-config/public/assets/non-exist.txt
test/fixtures/reload-config/main.css
test/fixtures/reload-config-2/main.css
test/fixtures/worker-config-dev-server-false/public
!/test/fixtures/static-config/public/node_modules


================================================
FILE: .husky/commit-msg
================================================
commitlint --edit $1


================================================
FILE: .husky/pre-commit
================================================
lint-staged


================================================
FILE: .prettierignore
================================================
/client
!/test/client
coverage
node_modules
CHANGELOG.md
examples/client/trusted-types-overlay/app.js


================================================
FILE: .versionrc
================================================
{
  "types": [
    {"type":"feat","section":"Features"},
    {"type":"fix","section":"Bug Fixes"},
    {"type":"test", "hidden": true}
  ]
}


================================================
FILE: CHANGELOG.md
================================================
# Changelog

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

### [5.2.3](https://github.com/webpack/webpack-dev-server/compare/v5.2.2...v5.2.3) (2026-01-12)


### Bug Fixes

* add `cause` for `errorObject` ([#5518](https://github.com/webpack/webpack-dev-server/issues/5518)) ([37b033d](https://github.com/webpack/webpack-dev-server/commit/37b033da2c48335178495a1987c469a26ef3de60))
* compatibility with event target and universal target and lazy compilation  ([574026c](https://github.com/webpack/webpack-dev-server/commit/574026c44b9c51f0bbd2f5a2836c54607289a071))
* **overlay:** add ESC key to dismiss overlay ([#5598](https://github.com/webpack/webpack-dev-server/issues/5598)) ([f91baa8](https://github.com/webpack/webpack-dev-server/commit/f91baa8831e061e2998849966b8002b40b83fb07))
* progress indicator styles ([#5557](https://github.com/webpack/webpack-dev-server/issues/5557)) ([41a53a1](https://github.com/webpack/webpack-dev-server/commit/41a53a1accdb0a90785d82cbe8a079794eeed3c8))
* upgrade selfsigned to v5

### [5.2.2](https://github.com/webpack/webpack-dev-server/compare/v5.2.1...v5.2.2) (2025-06-03)


### Bug Fixes

* "Overlay enabled" false positive ([18e72ee](https://github.com/webpack/webpack-dev-server/commit/18e72ee3e57a6e7598a6c068c0ff7c7bb6a857f1))
* do not crush when error is null for runtime errors ([#5447](https://github.com/webpack/webpack-dev-server/issues/5447)) ([309991f](https://github.com/webpack/webpack-dev-server/commit/309991f947baa0354140b9930a9654ac792e20c4))
* remove unnecessary header `X_TEST` ([#5451](https://github.com/webpack/webpack-dev-server/issues/5451)) ([64a6124](https://github.com/webpack/webpack-dev-server/commit/64a6124bf1b4d158bb42a4341dd03121ae3759fa))
* respect the `allowedHosts` option for cross-origin header check ([#5510](https://github.com/webpack/webpack-dev-server/issues/5510)) ([03d1214](https://github.com/webpack/webpack-dev-server/commit/03d12141bf7be09dfb14e91e5c834ee63bd9a9a2))

## [5.2.1](https://github.com/webpack/webpack-dev-server/compare/v5.2.0...v6.0.0) (2025-03-26)

### Security

* cross-origin requests are not allowed unless allowed by `Access-Control-Allow-Origin` header
* requests with an IP addresses in the `Origin` header are not allowed to connect to WebSocket server unless configured by `allowedHosts` or it different from the `Host` header

The above changes may make the dev server not work if you relied on such behavior, but unfortunately they carry security risks, so they were considered as fixes.

### Bug Fixes

* prevent overlay for errors caught by React error boundaries ([#5431](https://github.com/webpack/webpack-dev-server/issues/5431)) ([8c1abc9](https://github.com/webpack/webpack-dev-server/commit/8c1abc903ab444d9ce99e567b9a6c603e1ec06be))
* take the first network found instead of the last one, this restores the same behavior as 5.0.4 ([#5411](https://github.com/webpack/webpack-dev-server/issues/5411)) ([ffd0b86](https://github.com/webpack/webpack-dev-server/commit/ffd0b86b790d372f90e17aea92cfd9def83fee96))

## [5.2.0](https://github.com/webpack/webpack-dev-server/compare/v5.1.0...v5.2.0) (2024-12-11)


### Features

* added `getClientEntry` and `getClientHotEntry` methods to get clients entries ([dc642a8](https://github.com/webpack/webpack-dev-server/commit/dc642a832d45c23c5c7a08fbf29995e0db7e0d95))


### Bug Fixes

* speed up initial client bundling ([145b5d0](https://github.com/webpack/webpack-dev-server/commit/145b5d01610a16468fc32719a20366682b0e8572))

## [5.1.0](https://github.com/webpack/webpack-dev-server/compare/v5.0.4...v5.1.0) (2024-09-03)


### Features

* add visual progress indicators ([a8f40b7](https://github.com/webpack/webpack-dev-server/commit/a8f40b74e6439a8281b9fe8868eb9db7e4c5de50))
* added the `app` option to be `Function` (by default only with `connect` compatibility frameworks) ([3096148](https://github.com/webpack/webpack-dev-server/commit/3096148746c906105c4424352f5b5ad1bff0fd4f))
* allow the `server` option to be `Function` ([#5275](https://github.com/webpack/webpack-dev-server/issues/5275)) ([02a1c6d](https://github.com/webpack/webpack-dev-server/commit/02a1c6d788f5fc47c11cc7d910fd1b5e17aed886))
* http2 support for `connect` and `connect` compatibility frameworks which support HTTP2 ([#5267](https://github.com/webpack/webpack-dev-server/issues/5267)) ([6509a3f](https://github.com/webpack/webpack-dev-server/commit/6509a3fd3eb5decb61f60a9f2db97d76f71ecb99))


### Bug Fixes

* check the `platform` property to determinate the target ([#5269](https://github.com/webpack/webpack-dev-server/issues/5269)) ([c3b532c](https://github.com/webpack/webpack-dev-server/commit/c3b532c6360317319793dcda22c76fbfc05fbdcf))
* ipv6 output ([#5270](https://github.com/webpack/webpack-dev-server/issues/5270)) ([06005e7](https://github.com/webpack/webpack-dev-server/commit/06005e7cb99e4c412b968ed3fb786acfb8c2e037))
* replace `rimraf` with `rm` ([#5162](https://github.com/webpack/webpack-dev-server/issues/5162)) ([1a1561f](https://github.com/webpack/webpack-dev-server/commit/1a1561f09bdfa7a98434d7d9cd62e323b887dfbf))
* replace default gateway ([#5255](https://github.com/webpack/webpack-dev-server/issues/5255)) ([f5f0902](https://github.com/webpack/webpack-dev-server/commit/f5f09024ff4fe6625aa94bcd69439462d74013f0))
* support `devServer: false` ([#5272](https://github.com/webpack/webpack-dev-server/issues/5272)) ([8b341cb](https://github.com/webpack/webpack-dev-server/commit/8b341cb8c1dc01cef62c70959620cd0cbd87fee7))

### [5.0.4](https://github.com/webpack/webpack-dev-server/compare/v5.0.3...v5.0.4) (2024-03-19)


### Bug Fixes

* **security:** bump webpack-dev-middleware ([#5112](https://github.com/webpack/webpack-dev-server/issues/5112)) ([aab576a](https://github.com/webpack/webpack-dev-server/commit/aab576a9e4930a1731e8b0380c859552fc9a6e11))

### [5.0.3](https://github.com/webpack/webpack-dev-server/compare/v5.0.2...v5.0.3) (2024-03-12)


### Bug Fixes

* **types:** proxy ([#5101](https://github.com/webpack/webpack-dev-server/issues/5101)) ([6e1aed3](https://github.com/webpack/webpack-dev-server/commit/6e1aed30ffd6456935b4fe22851cd560b0eae176))

### [5.0.2](https://github.com/webpack/webpack-dev-server/compare/v5.0.1...v5.0.2) (2024-02-16)


### Bug Fixes

* types ([#5057](https://github.com/webpack/webpack-dev-server/issues/5057)) ([da2c24d](https://github.com/webpack/webpack-dev-server/commit/da2c24ddd92198a1337553457eedcece6af38195))

### [5.0.1](https://github.com/webpack/webpack-dev-server/compare/v5.0.0...v5.0.1) (2024-02-13)


### Bug Fixes

* avoid using eval in client ([#5045](https://github.com/webpack/webpack-dev-server/issues/5045)) ([7681477](https://github.com/webpack/webpack-dev-server/commit/76814771dcebe80628b4462f5e1d30064ae226d5))
* overlay and `require-trusted-types-for` ([#5046](https://github.com/webpack/webpack-dev-server/issues/5046)) ([e115436](https://github.com/webpack/webpack-dev-server/commit/e11543677120b004d1f20e11fdf34c07897c7b0c))

## [5.0.0](https://github.com/webpack/webpack-dev-server/compare/v4.15.1...v5.0.0) (2024-02-12)

[Migration Guide and Changes](https://github.com/webpack/webpack-dev-server/blob/main/migration-v5.md).

### [4.15.1](https://github.com/webpack/webpack-dev-server/compare/v4.15.0...v4.15.1) (2023-06-09)


### Bug Fixes

* replace `::` with `localhost` before openBrowser() ([#4856](https://github.com/webpack/webpack-dev-server/issues/4856)) ([874c44b](https://github.com/webpack/webpack-dev-server/commit/874c44b072d55fe42a29d366dbe1c71ca3a94db4))
* **types:** compatibility with `@types/ws` ([#4899](https://github.com/webpack/webpack-dev-server/issues/4899)) ([34bcec2](https://github.com/webpack/webpack-dev-server/commit/34bcec242b8bc64c26e9455a8fd5781a59fbcf24))

## [4.15.0](https://github.com/webpack/webpack-dev-server/compare/v4.14.0...v4.15.0) (2023-05-07)


### Features

* overlay displays unhandled promise rejection ([#4849](https://github.com/webpack/webpack-dev-server/issues/4849)) ([d1dd430](https://github.com/webpack/webpack-dev-server/commit/d1dd4305bf3861c43caf374c101a80e65e18b138))

## [4.14.0](https://github.com/webpack/webpack-dev-server/compare/v4.13.3...v4.14.0) (2023-05-06)


### Features

* allow CLI to be ESM ([#4837](https://github.com/webpack/webpack-dev-server/issues/4837)) ([bb4a5d9](https://github.com/webpack/webpack-dev-server/commit/bb4a5d9e8f87a89c81d4024085ff6c9ebb6c551b))
* allow filter overlay errors/warnings with function ([#4813](https://github.com/webpack/webpack-dev-server/issues/4813)) ([aab01b3](https://github.com/webpack/webpack-dev-server/commit/aab01b3c4e4fb9ca9ae1c1bbc860a52a06026de6))

### [4.13.3](https://github.com/webpack/webpack-dev-server/compare/v4.13.2...v4.13.3) (2023-04-15)


### Bug Fixes

* **perf:** reduced initial start time ([#4818](https://github.com/webpack/webpack-dev-server/issues/4818)) ([fcf01d1](https://github.com/webpack/webpack-dev-server/commit/fcf01d1b8eb67aa1c93486e1b34ceefc33d9ee73))

### [4.13.2](https://github.com/webpack/webpack-dev-server/compare/v4.13.1...v4.13.2) (2023-03-31)


### Bug Fixes

* prevent open 0.0.0.0 in browser due windows problems ([04e74f2](https://github.com/webpack/webpack-dev-server/commit/04e74f2ba32963932c0ab46ac4862e92c3e4e1e1))

### [4.13.1](https://github.com/webpack/webpack-dev-server/compare/v4.13.0...v4.13.1) (2023-03-18)


### Bug Fixes

* make webpack optional peer dependency ([#4778](https://github.com/webpack/webpack-dev-server/issues/4778)) ([71be54e](https://github.com/webpack/webpack-dev-server/commit/71be54edcb890f53d2cd900c2801989a17c2c9b1))

## [4.13.0](https://github.com/webpack/webpack-dev-server/compare/v4.12.0...v4.13.0) (2023-03-17)


### Features

* added `client.overlay.runtimeErrors` option to control runtime errors ([#4773](https://github.com/webpack/webpack-dev-server/issues/4773)) ([dca2366](https://github.com/webpack/webpack-dev-server/commit/dca2366e22a262e6052dae060c8b237f4e6fd26b))

## [4.12.0](https://github.com/webpack/webpack-dev-server/compare/v4.11.1...v4.12.0) (2023-03-14)


### Features

* allow to set the `sockjs_url` option (only `sockjs`) using the `webSocketServer.options.sockjsUrl` option ([#4586](https://github.com/webpack/webpack-dev-server/issues/4586)) ([69a2fba](https://github.com/webpack/webpack-dev-server/commit/69a2fba4e915b4814de1c3cb27930a13dc994945))
* catch runtime error ([#4605](https://github.com/webpack/webpack-dev-server/issues/4605)) ([87a26cf](https://github.com/webpack/webpack-dev-server/commit/87a26cf4c1fd9ac8140d345a8520a8d5cb059556))
* improve styles for overlay ([#4576](https://github.com/webpack/webpack-dev-server/issues/4576)) ([791fb85](https://github.com/webpack/webpack-dev-server/commit/791fb85931299eea052b3c37d4353d48ea34fa5e))
* open editor when clicking error on overlay ([#4587](https://github.com/webpack/webpack-dev-server/issues/4587)) ([efb2cec](https://github.com/webpack/webpack-dev-server/commit/efb2cec3f8acbbe5113aad20529e268c01ac29c2))


### Bug Fixes

* compatibility with `experiments.buildHttp` ([#4585](https://github.com/webpack/webpack-dev-server/issues/4585)) ([5b846cb](https://github.com/webpack/webpack-dev-server/commit/5b846cbe9bfb8444bc7605654fcebf4e87766aa4))
* respect `NODE_PATH` env variable ([#4581](https://github.com/webpack/webpack-dev-server/issues/4581)) ([b857e6f](https://github.com/webpack/webpack-dev-server/commit/b857e6fa3b86facc63811438eef17be92dc36dc6))

### [4.11.1](https://github.com/webpack/webpack-dev-server/compare/v4.11.0...v4.11.1) (2022-09-19)


### Bug Fixes

* respect `client.logging` option for all logs ([#4572](https://github.com/webpack/webpack-dev-server/issues/4572)) ([375835c](https://github.com/webpack/webpack-dev-server/commit/375835c926ec03fdfecae9ab1b54fd43b1ff4b31))

## [4.11.0](https://github.com/webpack/webpack-dev-server/compare/v4.10.1...v4.11.0) (2022-09-07)


### Features

* make allowedHosts accept localhost subdomains by default ([#4357](https://github.com/webpack/webpack-dev-server/issues/4357)) ([0a33e6a](https://github.com/webpack/webpack-dev-server/commit/0a33e6a7529ef20ec8841c3fd501c37da179be3e))


### Bug Fixes

* auto reply to OPTIONS requests only when unhandled ([#4559](https://github.com/webpack/webpack-dev-server/issues/4559)) ([984af02](https://github.com/webpack/webpack-dev-server/commit/984af026a50f3e77c58abe24475da40a4ed038f1)), closes [#4551](https://github.com/webpack/webpack-dev-server/issues/4551)

### [4.10.1](https://github.com/webpack/webpack-dev-server/compare/v4.10.0...v4.10.1) (2022-08-29)


### Bug Fixes

* compatibility with old browsers ([#4544](https://github.com/webpack/webpack-dev-server/issues/4544)) ([6a430d4](https://github.com/webpack/webpack-dev-server/commit/6a430d495e3e616304000e21e72deba27eb5303f))

## [4.10.0](https://github.com/webpack/webpack-dev-server/compare/v4.9.3...v4.10.0) (2022-08-10)


### Features

* allow to configure more `client` options via resource URL ([#4274](https://github.com/webpack/webpack-dev-server/issues/4274)) ([216e3cb](https://github.com/webpack/webpack-dev-server/commit/216e3cbe62dc90b9345995cb4f33ca9dd7b6aaba))


### Bug Fixes

* response correctly when receive an OPTIONS request ([#4185](https://github.com/webpack/webpack-dev-server/issues/4185)) ([2b3b7e0](https://github.com/webpack/webpack-dev-server/commit/2b3b7e000f688e086c68ba821ed2edc3cd56a219))

### [4.9.3](https://github.com/webpack/webpack-dev-server/compare/v4.9.2...v4.9.3) (2022-06-29)


### Bug Fixes

* avoid creation unnecessary stream for static sockjs file ([#4482](https://github.com/webpack/webpack-dev-server/issues/4482)) ([049b153](https://github.com/webpack/webpack-dev-server/commit/049b153b87ab908ae53b71356e0716bb3fc5bf07))
* history-api-fallback now supports HEAD requests and handles them the same as GET ([8936082](https://github.com/webpack/webpack-dev-server/commit/8936082809a9575f231afbcad6a32bb8e14d6dce))

### [4.9.2](https://github.com/webpack/webpack-dev-server/compare/v4.9.1...v4.9.2) (2022-06-06)


### Bug Fixes

* add `@types/serve-static` to dependencies ([#4468](https://github.com/webpack/webpack-dev-server/issues/4468)) ([af83deb](https://github.com/webpack/webpack-dev-server/commit/af83deb199dc1d8cae4365ec2c5acf07e29358df))

### [4.9.1](https://github.com/webpack/webpack-dev-server/compare/v4.9.0...v4.9.1) (2022-05-31)


### Bug Fixes

* security problem with sockjs ([#4465](https://github.com/webpack/webpack-dev-server/issues/4465)) ([e765182](https://github.com/webpack/webpack-dev-server/commit/e765182e426cbca9c3c09294b02ac2d9737c1d74))

## [4.9.0](https://github.com/webpack/webpack-dev-server/compare/v4.8.1...v4.9.0) (2022-05-04)


### Features

* support Trusted Types for client overlay ([#4404](https://github.com/webpack/webpack-dev-server/issues/4404)) ([8132e1d](https://github.com/webpack/webpack-dev-server/commit/8132e1d029badab7b1e836f8f240844c2d843ecc))


### Bug Fixes

* ie11 runtime ([#4403](https://github.com/webpack/webpack-dev-server/issues/4403)) ([256d5fb](https://github.com/webpack/webpack-dev-server/commit/256d5fb5fea7ee5a6683f77ea347ac79816ad639))
* replace portfinder with custom implementation and fix security problem ([#4384](https://github.com/webpack/webpack-dev-server/issues/4384)) ([eea50f3](https://github.com/webpack/webpack-dev-server/commit/eea50f342e3090483f6da4932b84ed52bba44c58))
* use the host in options to check if port is available ([#4385](https://github.com/webpack/webpack-dev-server/issues/4385)) ([a10c7cf](https://github.com/webpack/webpack-dev-server/commit/a10c7cfd290d29384d14405d7cf79e105c7b5d15))

### [4.8.1](https://github.com/webpack/webpack-dev-server/compare/v4.8.0...v4.8.1) (2022-04-06)


### Bug Fixes

* types ([#4373](https://github.com/webpack/webpack-dev-server/issues/4373)) ([f6fe6be](https://github.com/webpack/webpack-dev-server/commit/f6fe6be27656c9cc1e65a894a889d7443be7e6a8))

## [4.8.0](https://github.com/webpack/webpack-dev-server/compare/v4.7.4...v4.8.0) (2022-04-05)


### Features

* export initialized socket client ([#4304](https://github.com/webpack/webpack-dev-server/issues/4304)) ([7920364](https://github.com/webpack/webpack-dev-server/commit/7920364d6b6ac29e1b7fdbb38c8a9fe22eec61de))


### Bug Fixes

* update description for `--no-client-reconnect` ([#4248](https://github.com/webpack/webpack-dev-server/issues/4248)) ([317648d](https://github.com/webpack/webpack-dev-server/commit/317648df21562f9dfe1b9f8069642b91ac3bffae))
* update description for `--no-client` ([#4250](https://github.com/webpack/webpack-dev-server/issues/4250)) ([c3b6690](https://github.com/webpack/webpack-dev-server/commit/c3b669077089802412774079f38a13bce054eee7))
* update description for `--no-history-api-fallback` ([#4277](https://github.com/webpack/webpack-dev-server/issues/4277)) ([d63a0a2](https://github.com/webpack/webpack-dev-server/commit/d63a0a298739d599f2161b237a750220c314deef))
* update negated descriptions for more options ([#4287](https://github.com/webpack/webpack-dev-server/issues/4287)) ([c64bd94](https://github.com/webpack/webpack-dev-server/commit/c64bd94fb75c30984281f71ad3c20393fcb5ee67))
* update schema to have `negatedDescription` only for type `boolean` ([#4280](https://github.com/webpack/webpack-dev-server/issues/4280)) ([fcf8e8e](https://github.com/webpack/webpack-dev-server/commit/fcf8e8e6a9951f4283e796df3ad72cc803e634a3))

### [4.7.4](https://github.com/webpack/webpack-dev-server/compare/v4.7.3...v4.7.4) (2022-02-02)


### Bug Fixes

* add @types/express ([#4226](https://github.com/webpack/webpack-dev-server/issues/4226)) ([e55f728](https://github.com/webpack/webpack-dev-server/commit/e55f728d3b5262884aa80daf9b021198b4bc65a9))
* negative descriptions ([#4216](https://github.com/webpack/webpack-dev-server/issues/4216)) ([fd854c0](https://github.com/webpack/webpack-dev-server/commit/fd854c07c2a4654f479bdbad1b717d9406ce15c6))
* types for the `proxy` option ([#4173](https://github.com/webpack/webpack-dev-server/issues/4173)) ([efec2f5](https://github.com/webpack/webpack-dev-server/commit/efec2f5bfb5ff4b99258b12317aa0d922836738e))
* use CLI specific description for `--open-app-name` and `--web-socket-server` ([#4215](https://github.com/webpack/webpack-dev-server/issues/4215)) ([329679a](https://github.com/webpack/webpack-dev-server/commit/329679a434219adc43f2d73c2ceeda14787dc64d))

### [4.7.3](https://github.com/webpack/webpack-dev-server/compare/v4.7.2...v4.7.3) (2022-01-11)

### Security

* update `selfsigned` to `2.0.0` version

### [4.7.2](https://github.com/webpack/webpack-dev-server/compare/v4.7.1...v4.7.2) (2021-12-29)


### Bug Fixes

* apply `onAfterSetupMiddleware` after `setupMiddlewares` (as behavior earlier) ([f6bc644](https://github.com/webpack/webpack-dev-server/commit/f6bc644bb81b966e030d8f8a54d5a99cd61ec8f2))

### [4.7.1](https://github.com/webpack/webpack-dev-server/compare/v4.7.0...v4.7.1) (2021-12-22)


### Bug Fixes

* removed `url` package, fixed compatibility with future webpack defaults ([#4132](https://github.com/webpack/webpack-dev-server/issues/4132)) ([4e5d8ea](https://github.com/webpack/webpack-dev-server/commit/4e5d8eae654ef382697722c6406dbc96207594aa))

## [4.7.0](https://github.com/webpack/webpack-dev-server/compare/v4.6.0...v4.7.0) (2021-12-21)


### Features

* added the `setupMiddlewares` option and deprecated `onAfterSetupMiddleware` and `onBeforeSetupMiddleware` options ([#4068](https://github.com/webpack/webpack-dev-server/issues/4068)) ([c13aa56](https://github.com/webpack/webpack-dev-server/commit/c13aa560651a3bb4c4a7b1b4363c04383596c7e9))
* added types ([8f02c3f](https://github.com/webpack/webpack-dev-server/commit/8f02c3f3d6131fd37f58ef4d5cbe15578c94a6fd))
* show deprecation warning for `cacert` option ([#4115](https://github.com/webpack/webpack-dev-server/issues/4115)) ([c73ddfb](https://github.com/webpack/webpack-dev-server/commit/c73ddfb934ec748e3dd34456d4293b933e9c6c99))


### Bug Fixes

* add description for `watchFiles` options ([#4057](https://github.com/webpack/webpack-dev-server/issues/4057)) ([75f3817](https://github.com/webpack/webpack-dev-server/commit/75f381751e5377ae297c32f9fcdcd096ef28c5c2))
* allow passing options for custom server ([#4110](https://github.com/webpack/webpack-dev-server/issues/4110)) ([fc8bed9](https://github.com/webpack/webpack-dev-server/commit/fc8bed95251f27a24c1441307c44782f3836edd6))
* correct schema for `ClientLogging` ([#4084](https://github.com/webpack/webpack-dev-server/issues/4084)) ([9b7ae7b](https://github.com/webpack/webpack-dev-server/commit/9b7ae7b5f4ac4a920b1ae3b47a8eb15d093cb369))
* mark `--open-app` deprecated in favor of `--open-app-name` ([#4091](https://github.com/webpack/webpack-dev-server/issues/4091)) ([693c28a](https://github.com/webpack/webpack-dev-server/commit/693c28a0499e431b09274b8b7ecce71adb292c8f))
* show deprecation warning for both `https` and `http2` ([#4069](https://github.com/webpack/webpack-dev-server/issues/4069)) ([d8d5d71](https://github.com/webpack/webpack-dev-server/commit/d8d5d71c8ca495098e1ee30ebc72ffd657ad5ba0))
* update `--web-socket-server` description ([#4098](https://github.com/webpack/webpack-dev-server/issues/4098)) ([65955e9](https://github.com/webpack/webpack-dev-server/commit/65955e96cf7869dd4294699fd2a3878c2179c656))
* update `listen` and `close` deprecation warning message ([#4097](https://github.com/webpack/webpack-dev-server/issues/4097)) ([b217a19](https://github.com/webpack/webpack-dev-server/commit/b217a191d09a93e8dcc1fff2ee26e97857e096d3))
* update descriptions of `https` and `server` options ([#4094](https://github.com/webpack/webpack-dev-server/issues/4094)) ([f97c9e2](https://github.com/webpack/webpack-dev-server/commit/f97c9e2df460ef9a84c8ab2016c6bce3c90d93ac))

## [4.6.0](https://github.com/webpack/webpack-dev-server/compare/v4.5.0...v4.6.0) (2021-11-25)


### Features

* allow to pass all `chokidar` options ([#4025](https://github.com/webpack/webpack-dev-server/issues/4025)) ([5026601](https://github.com/webpack/webpack-dev-server/commit/5026601bd670eb65bdddabc208ec9ae73a58e592))


### Bug Fixes

* reconnection logic ([#4044](https://github.com/webpack/webpack-dev-server/issues/4044)) ([9b32c96](https://github.com/webpack/webpack-dev-server/commit/9b32c968fd96a57f5bab36416f79e649ab3a4a2c))
* reload on warnings ([#4056](https://github.com/webpack/webpack-dev-server/issues/4056)) ([1ba9720](https://github.com/webpack/webpack-dev-server/commit/1ba97201f71b8a5b8f67281059f4834e55bf8f67))

## [4.5.0](https://github.com/webpack/webpack-dev-server/compare/v4.4.0...v4.5.0) (2021-11-13)


### Features

* add `--web-socket-server-type` option for CLI ([#4001](https://github.com/webpack/webpack-dev-server/issues/4001)) ([17c390a](https://github.com/webpack/webpack-dev-server/commit/17c390a04e474a675255eb25132b423e0614253f))
* show deprecation warning for `https`/`http2` option, [migration guide for `https`](https://github.com/webpack/webpack-dev-server/tree/main/examples/server/https) and [migration guide for `http2`](https://github.com/webpack/webpack-dev-server/tree/main/examples/server/spdy) (because we use [`spdy`](https://github.com/spdy-http2/node-spdy) for http2 due `express` doesn't support http2) ([#4003](https://github.com/webpack/webpack-dev-server/issues/4003)) ([521cf85](https://github.com/webpack/webpack-dev-server/commit/521cf852a81c5913e17cf36c90140c566d4218e5))


### Bug Fixes

* infinity refresh on warnings ([#4006](https://github.com/webpack/webpack-dev-server/issues/4006)) ([10da223](https://github.com/webpack/webpack-dev-server/commit/10da2238b0fce26973160ef03ba0dd35d5bc0568))
* invalid host message is missing on client with https ([#3997](https://github.com/webpack/webpack-dev-server/issues/3997)) ([#3998](https://github.com/webpack/webpack-dev-server/issues/3998)) ([ff0869c](https://github.com/webpack/webpack-dev-server/commit/ff0869cb08cd886ed5b1f8265736d514358c7305))
* remove process listeners after stopping the server ([#4013](https://github.com/webpack/webpack-dev-server/issues/4013)) ([d198e4e](https://github.com/webpack/webpack-dev-server/commit/d198e4e138c194427af596663c129515353db9c4))

## [4.4.0](https://github.com/webpack/webpack-dev-server/compare/v4.3.1...v4.4.0) (2021-10-27)


### Features

* added the `server` option, now you can pass server options, example `{ server: { type: 'http', options: { maxHeaderSize: 32768 } } }`, available options for [`http`](https://nodejs.org/api/http.html#httpcreateserveroptions-requestlistener) and [`https`](https://nodejs.org/api/https.html#httpscreateserveroptions-requestlistener), note - for `http2` is used [`spdy`](https://github.com/spdy-http2/node-spdy), options specified in the `server.options` option take precedence over `https`/`http2` options ([#3940](https://github.com/webpack/webpack-dev-server/issues/3940)) ([a70a7ef](https://github.com/webpack/webpack-dev-server/commit/a70a7ef025f07ec6be69cee0b3b5204c7e3a0c5b))
* added the `client.reconnect` option ([#3912](https://github.com/webpack/webpack-dev-server/issues/3912)) ([5edad76](https://github.com/webpack/webpack-dev-server/commit/5edad76bb099713210b2a8c5c29d22371df7371e))
* improve error handling within `startCallback` and `endCallback` ([#3969](https://github.com/webpack/webpack-dev-server/issues/3969)) ([b0928ac](https://github.com/webpack/webpack-dev-server/commit/b0928acadccd2251a9eb165bfae0c63c84d0d745))


### Bug Fixes

* schema for web socket server type ([#3913](https://github.com/webpack/webpack-dev-server/issues/3913)) ([f6aa6f7](https://github.com/webpack/webpack-dev-server/commit/f6aa6f7979dae5a44ff4597b7338027c5aab869a))
* typo in SSL information log ([#3939](https://github.com/webpack/webpack-dev-server/issues/3939)) ([4c6103b](https://github.com/webpack/webpack-dev-server/commit/4c6103ba9495a29c6e142373c8dad084a20b6bc8))

### [4.3.1](https://github.com/webpack/webpack-dev-server/compare/v4.3.0...v4.3.1) (2021-10-04)


### Bug Fixes

* perf ([#3906](https://github.com/webpack/webpack-dev-server/issues/3906)) ([f6e2a19](https://github.com/webpack/webpack-dev-server/commit/f6e2a1981d4c552368cd06ccf5dc400db298c2d6))

## [4.3.0](https://github.com/webpack/webpack-dev-server/compare/v4.2.1...v4.3.0) (2021-09-25)


### Features

* allow array for `headers` option ([#3847](https://github.com/webpack/webpack-dev-server/issues/3847)) ([9911437](https://github.com/webpack/webpack-dev-server/commit/9911437186a28b2249adfb282524361d7afe6c25))
* gracefully and force shutdown ([#3880](https://github.com/webpack/webpack-dev-server/issues/3880)) ([db24b16](https://github.com/webpack/webpack-dev-server/commit/db24b16e66a63a51e5bacead47ed30c3bf21ff5b))


### Bug Fixes

* avoid web socket connection when web socket server is not running ([#3879](https://github.com/webpack/webpack-dev-server/issues/3879)) ([8874d72](https://github.com/webpack/webpack-dev-server/commit/8874d72f2ee8f11c8420de131e8335982e516727))
* display file name for warnings/errors in overlay ([#3867](https://github.com/webpack/webpack-dev-server/issues/3867)) ([d20def5](https://github.com/webpack/webpack-dev-server/commit/d20def5c71609ad97ea783716c53070235f398cc))
* formatting errors/warnings ([#3877](https://github.com/webpack/webpack-dev-server/issues/3877)) ([f0dbea0](https://github.com/webpack/webpack-dev-server/commit/f0dbea019c822e7e4b7e5ed81a6a9588e9521d73))
* handle 0 value of the `port` option property ([ed67f66](https://github.com/webpack/webpack-dev-server/commit/ed67f66fc41eb1dd83fb84ecaa18703559dbe2ae))

### [4.2.1](https://github.com/webpack/webpack-dev-server/compare/v4.2.0...v4.2.1) (2021-09-13)


### Bug Fixes

* infinity loop for multi compiler mode ([#3840](https://github.com/webpack/webpack-dev-server/issues/3840)) ([e019bd2](https://github.com/webpack/webpack-dev-server/commit/e019bd24ea061c4839a4667f8bd75a04b9a48128))
* reloading logic for multi compiler mode ([#3841](https://github.com/webpack/webpack-dev-server/issues/3841)) ([ef148ec](https://github.com/webpack/webpack-dev-server/commit/ef148ec1feb66d0f72457d0b2de853b76b06b3c9))

### [4.2.0](https://github.com/webpack/webpack-dev-server/compare/v4.1.1...v4.2.0) (2021-09-09)


### Features

* added the `http.ca` option (CLI option added too) (should be used instead `cacert`, because we will remove it in the next major release in favor the `https.ca` option)
* added the `https.crl` option (CLI options added too), [more information](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
* `https.ca`/`https.cacert`/ `https.cert`/`https.crl`/`https.key`/`https.pfx` options are now accept Arrays of `Buffer`/`string`/Path to file, using `--https-*-reset` CLI options you can reset these options
* `https.pfx`/`https.key` can be `Object[]`, [more information](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options)
* `https` options can now accept custom options, you can use:

```js
module.exports = {
  // Other options
  devServer: {
    https: {
      // Allow to set additional TSL options https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options
      minVersion: "TLSv1.1",
      ca: path.join(httpsCertificateDirectory, "ca.pem"),
      pfx: path.join(httpsCertificateDirectory, "server.pfx"),
      key: path.join(httpsCertificateDirectory, "server.key"),
      cert: path.join(httpsCertificateDirectory, "server.crt"),
      passphrase: "webpack-dev-server",
    },
  }
};
```

### Bug Fixes

* accept connections with `file:` and `chrome-extensions:` protocol by default ([#3822](https://github.com/webpack/webpack-dev-server/issues/3822)) ([138f064](https://github.com/webpack/webpack-dev-server/commit/138f0641a4aa040fa2ff66dfd8891c920aa17808))
* close overlay on disconnection ([#3825](https://github.com/webpack/webpack-dev-server/issues/3825)) ([011bcf1](https://github.com/webpack/webpack-dev-server/commit/011bcf15c7eba8f7dcd45731f8e434b2eccf781e))
* respect `https.cacert` option ([#3820](https://github.com/webpack/webpack-dev-server/issues/3820)) ([0002ebf](https://github.com/webpack/webpack-dev-server/commit/0002ebfbc8f36e92f91013372c9e2bca97022825))

### [4.1.1](https://github.com/webpack/webpack-dev-server/compare/v4.1.0...v4.1.1) (2021-09-07)


### Bug Fixes

* improve the description of the `magicHtml` option ([#3772](https://github.com/webpack/webpack-dev-server/issues/3772)) ([b80610f](https://github.com/webpack/webpack-dev-server/commit/b80610f07357c3b2ae8557f6d371e4d563ae3c53))
* replace `ansi-html` with `ansi-html-community` to avoid CVE ([#3801](https://github.com/webpack/webpack-dev-server/issues/3801)) ([36fd214](https://github.com/webpack/webpack-dev-server/commit/36fd21477dac5131ec266cc1d717d87051f10a2b))

## [4.1.0](https://github.com/webpack/webpack-dev-server/compare/v4.0.0...v4.1.0) (2021-08-31)


### Features

* added the `magicHtml` option ([#3717](https://github.com/webpack/webpack-dev-server/issues/3717)) ([4831f58](https://github.com/webpack/webpack-dev-server/commit/4831f58a75d12f75f4d5e5064ff3245f1a3770ba))
* allow to set `hot` and `live-reload` for client using search params ([1c57680](https://github.com/webpack/webpack-dev-server/commit/1c576802bff4a4be78b1771ed2fc8f343780663b))
* show warning when the `hot` option is enabled with the HMR plugin in config ([#3744](https://github.com/webpack/webpack-dev-server/issues/3744)) ([6cb1e4e](https://github.com/webpack/webpack-dev-server/commit/6cb1e4e6a25de3fb284be84d2ad67fc701800b96))

### Bug Fixes

* change log type of `Disconnected!` to `info` ([fde27f5](https://github.com/webpack/webpack-dev-server/commit/fde27f5002ae3d679b2cee2215287f6e3a16febf))
* handle `--allowed-hosts all` correctly ([#3720](https://github.com/webpack/webpack-dev-server/issues/3720)) ([326ed56](https://github.com/webpack/webpack-dev-server/commit/326ed567638944bc3b64e185b118f9e723383e44))
* output documentation link on errors ([#3680](https://github.com/webpack/webpack-dev-server/issues/3680)) ([e16221b](https://github.com/webpack/webpack-dev-server/commit/e16221b1aed48f93c31c8659438834fdbf1e62bf))
* respect the `bypass` option with `target`/`router` options for proxy ([b5dd568](https://github.com/webpack/webpack-dev-server/commit/b5dd5687e521cd70e7e13b397280d8bda38df255))

## [4.0.0](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-rc.1...v4.0.0) (2021-08-18)

## Notes:

- migration guide from v3 to v4 can be found [here](https://github.com/webpack/webpack-dev-server/blob/main/migration-v4.md)

### Bug Fixes

* improve https CLI output ([#3673](https://github.com/webpack/webpack-dev-server/issues/3673)) ([f2d87fb](https://github.com/webpack/webpack-dev-server/commit/f2d87fb2dc3f9545dd9203beda8bf9ac056c70f6))
* initial reloading for lazy compilation ([#3662](https://github.com/webpack/webpack-dev-server/issues/3662)) ([1768d6b](https://github.com/webpack/webpack-dev-server/commit/1768d6b7913055dad02318a49de65df2e93baa4f))
* respect protocol from browser for manual setup ([#3675](https://github.com/webpack/webpack-dev-server/issues/3675)) ([cdcabb2](https://github.com/webpack/webpack-dev-server/commit/cdcabb240f9afcab504ca26fbf71d3af013dd806))

## [4.0.0-rc.1](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-rc.0...v4.0.0-rc.1) (2021-08-17)

## Notes:

- migration guide from v3 to v4 can be found [here](https://github.com/webpack/webpack-dev-server/blob/main/migration-v4.md)

### Features

* async API ([#3608](https://github.com/webpack/webpack-dev-server/issues/3608)) ([974ce25](https://github.com/webpack/webpack-dev-server/commit/974ce25669ef6a4f55e8a7576fc140bc7ccb55f1))
* use ECMA modules in client ([#3550](https://github.com/webpack/webpack-dev-server/issues/3550)) ([9307755](https://github.com/webpack/webpack-dev-server/commit/93077552c2bac020650936316dc93e03245b7a19))


### Bug Fixes

* fix usage legacy API ([#3660](https://github.com/webpack/webpack-dev-server/issues/3660)) ([c4678bc](https://github.com/webpack/webpack-dev-server/commit/c4678bc467370e7dc74d06a8b898515e448d0da0))
* proxy logging and allow to pass options without the `target` option ([#3651](https://github.com/webpack/webpack-dev-server/issues/3651)) ([6e2cbde](https://github.com/webpack/webpack-dev-server/commit/6e2cbde16b0d071b6dd5c243b1b0e867b69575c5))
* render ansi formatted error messages correctly in overlay ([#3579](https://github.com/webpack/webpack-dev-server/issues/3579)) ([9313454](https://github.com/webpack/webpack-dev-server/commit/9313454066c2a830b425965837a2756d8f945e97))
* use value of the `infastructureLogging.level` option by default for `client.logging`. ([#3613](https://github.com/webpack/webpack-dev-server/issues/3613)) ([c9ccc96](https://github.com/webpack/webpack-dev-server/commit/c9ccc96f9d5cd9930f69b927b248d52509ec1e55))
* schema for the `host` option ([#3549](https://github.com/webpack/webpack-dev-server/issues/3549)) ([7200d31](https://github.com/webpack/webpack-dev-server/commit/7200d3101403864b3ca795c6bf028197e9f62183))
* show deprecation warning for incorrect usage of Node.js API ([#3563](https://github.com/webpack/webpack-dev-server/issues/3563)) ([62b21ff](https://github.com/webpack/webpack-dev-server/commit/62b21ffb028685e76ee715babfe53d5a9606fbbc))

## [4.0.0-rc.0](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-beta.3...v4.0.0-rc.0) (2021-07-19)


## Notes:

- migration guide from v3 to v4 can be found [here](https://github.com/webpack/webpack-dev-server/blob/main/migration-v4.md)

### ⚠ BREAKING CHANGES

* rename `client.transport` to `client.webSocketTransport`
* move web socket client to web socket server class, i.e. to get web socket clients use `this.webSocketServer.clients`
* remove entry options (i.e. `hotEntry` and `needClientEntry`) in favor manual setup entries (#3494)
* you need to reset CLI options using `reset` option, please look them in `webpack serve --help`
* `host` and `port` options can't be `null` or empty string

### Features

* allow to close overlay in browser ([#3433](https://github.com/webpack/webpack-dev-server/issues/3433)) ([307f2e7](https://github.com/webpack/webpack-dev-server/commit/307f2e7879b6c1ee18f279eb8f6d30509d550a86))
* add port `auto` ([#3297](https://github.com/webpack/webpack-dev-server/issues/3297)) ([437c8d3](https://github.com/webpack/webpack-dev-server/commit/437c8d3be7041e4203920d3d8a6af5a8071406fd))
* added `<url>` pattern for open and allow to use multiple browsers ([#3496](https://github.com/webpack/webpack-dev-server/issues/3496)) ([7c7ccf9](https://github.com/webpack/webpack-dev-server/commit/7c7ccf9c6cf2a26f980b725e9ba8ee9e48e5d397))
* allow string value for `client.webSocketURL.port` ([#3354](https://github.com/webpack/webpack-dev-server/issues/3354)) ([f5e7f8f](https://github.com/webpack/webpack-dev-server/commit/f5e7f8f6d2236d01b8e9562a23d9db077ce4032e))
* allow to disable web socket server using `webSocketServer: false` ([f62f20f](https://github.com/webpack/webpack-dev-server/commit/f62f20f301e39ac16be089f2d51129443838b921))
* allow `username` and `password` in clientURL ([#3452](https://github.com/webpack/webpack-dev-server/issues/3452)) ([a7225d5](https://github.com/webpack/webpack-dev-server/commit/a7225d5efc473549619f6121570b33c76b4fda7e))
* display documentation links on errors ([#3512](https://github.com/webpack/webpack-dev-server/issues/3512)) ([54790ab](https://github.com/webpack/webpack-dev-server/commit/54790abab19ccfc6a96461c32675d410551f902a))
* enable `compress` by default ([#3303](https://github.com/webpack/webpack-dev-server/issues/3303)) ([4d251b5](https://github.com/webpack/webpack-dev-server/commit/4d251b5c29418aba447021517158e0348dc37d32))
* implement the `client.webSocketURL.protocol` option ([#3380](https://github.com/webpack/webpack-dev-server/issues/3380)) ([8998d6b](https://github.com/webpack/webpack-dev-server/commit/8998d6b3a28251c5f8a6481d134f7557c5dc8e2b))
* the `ipc` option was added for unix socket ([#3479](https://github.com/webpack/webpack-dev-server/issues/3479)) ([b559738](https://github.com/webpack/webpack-dev-server/commit/b559738047bbe6f9bf508747c8ed188dacdec258))
* support `Function` in headers option ([#3267](https://github.com/webpack/webpack-dev-server/issues/3267)) ([28f9597](https://github.com/webpack/webpack-dev-server/commit/28f95978f6494885a5f6402ec14e9290bcae6bf4))


### Bug Fixes

* allow to use `80` port for dev server ([#3487](https://github.com/webpack/webpack-dev-server/issues/3487)) ([22f18eb](https://github.com/webpack/webpack-dev-server/commit/22f18ebfae77df0d75a44f2fa136cfecd655bce7))
* avoid duplicate `App updated. Recompiling...` ([#3488](https://github.com/webpack/webpack-dev-server/issues/3488)) ([a2e3ead](https://github.com/webpack/webpack-dev-server/commit/a2e3eaddd400e77668b8ab6585fef89ffb963ede))
* do not allow empty string for `port` ([#3372](https://github.com/webpack/webpack-dev-server/issues/3372)) ([8c53102](https://github.com/webpack/webpack-dev-server/commit/8c53102840c2a0310931c43ccf320226bec74766))
* don't allow empty array for `allowedHosts` option ([#3451](https://github.com/webpack/webpack-dev-server/issues/3451)) ([17aa345](https://github.com/webpack/webpack-dev-server/commit/17aa345b36fa8d70c9242015303b814de55cfa71))
* get rid of Symbol core-js polyfill ([#3535](https://github.com/webpack/webpack-dev-server/issues/3535)) ([7afe3d2](https://github.com/webpack/webpack-dev-server/commit/7afe3d2559d7f4145fe67bbffa8994498ee3a3b6))
* the `host` option can't be `null` or empty string ([#3352](https://github.com/webpack/webpack-dev-server/issues/3352)) ([216b0d3](https://github.com/webpack/webpack-dev-server/commit/216b0d3c71a617eeef32cff523f95fcd8916af72))
* improve message for static content changes ([#3289](https://github.com/webpack/webpack-dev-server/issues/3289)) ([970a7d7](https://github.com/webpack/webpack-dev-server/commit/970a7d7bbee1be33c749ee3faae344fc6567a599))
* improve processing of CLI flags ([#3313](https://github.com/webpack/webpack-dev-server/issues/3313)) ([32bc877](https://github.com/webpack/webpack-dev-server/commit/32bc877f378af5fbf893d9e152369ed68ab127ee))
* rename `firewall` option to `allowedHosts` option ([#3345](https://github.com/webpack/webpack-dev-server/issues/3345)) ([81e4e55](https://github.com/webpack/webpack-dev-server/commit/81e4e557a07381980083efdeb99eb26265b38aae))
* pass own logger in historyApiFallback ([#3373](https://github.com/webpack/webpack-dev-server/issues/3373)) ([3ba2fa5](https://github.com/webpack/webpack-dev-server/commit/3ba2fa5817c49e95424f7dfab2ca0a94af82996b))
* polling usage in watchFiles option ([#3366](https://github.com/webpack/webpack-dev-server/issues/3366)) ([2afb223](https://github.com/webpack/webpack-dev-server/commit/2afb223fb5384da2416ecf4b39ac45963d9ee2d5))
* postpone initialize ([#3467](https://github.com/webpack/webpack-dev-server/issues/3467)) ([80087de](https://github.com/webpack/webpack-dev-server/commit/80087dec9a816e6d68984b18a82e875b1a826835))
* regression with `port` and `bonjour` ([c2805fe](https://github.com/webpack/webpack-dev-server/commit/c2805fe5a3c359809e315d9ba55849a5bbbe3ecf))
* rename `path` to `pathname` for `client.webSocketURL` ([#3466](https://github.com/webpack/webpack-dev-server/issues/3466)) ([fd63e02](https://github.com/webpack/webpack-dev-server/commit/fd63e02ff58ed7e3ab2dcb84a36f0d49c1d553a2))
* respect `logLevel` and `logProvider` option for proxy ([#3257](https://github.com/webpack/webpack-dev-server/issues/3257)) ([199baec](https://github.com/webpack/webpack-dev-server/commit/199baec187376213f55d8d0542798f4945b8cce5))
* show plugin name in progress log ([#3337](https://github.com/webpack/webpack-dev-server/issues/3337)) ([b8a0932](https://github.com/webpack/webpack-dev-server/commit/b8a09323cb0d6f009459f77b618722408dfbe68c))

## [4.0.0-beta.3](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-beta.2...v4.0.0-beta.3) (2021-05-06)


### ⚠ BREAKING CHANGES

* the `https.ca` option was removed in favor the `https.cacert` option
* the `dev` option was renamed to `devMiddleware`
* the `client.overlay` option is `true` by default and show warnings by default
* use server port for websocket connection by default, if you proxied `webpack-dev-server`, please update `webpack-cli` to `v4.7.0` ([#3185](https://github.com/webpack/webpack-dev-server/issues/3185)) ([0c3f817](https://github.com/webpack/webpack-dev-server/commit/0c3f8178bc80d7272246fe810964561ae747ec49))
* minimum supported Node.js version is `12.13.0`

### Features

* added `https.cacert` ([#3240](https://github.com/webpack/webpack-dev-server/issues/3240)) ([b212a2c](https://github.com/webpack/webpack-dev-server/commit/b212a2ce73c3e58f3450708801c8b413ca65fb5b))
* added more CLI options, please run `webpack server --help` to look at them ([#3238](https://github.com/webpack/webpack-dev-server/issues/3238)) ([469e558](https://github.com/webpack/webpack-dev-server/commit/469e558d1d772006a1057954331ccecd34dfdefa))
* support `bonjour` options ([#3202](https://github.com/webpack/webpack-dev-server/issues/3202)) ([5534583](https://github.com/webpack/webpack-dev-server/commit/55345836c2d8e22e45c2150a8f003019d8a0bd56))

### Bug Fixes

* improve warning message for `open` ([#3191](https://github.com/webpack/webpack-dev-server/issues/3191)) ([d473fd9](https://github.com/webpack/webpack-dev-server/commit/d473fd9a55334efd8d349aa2b37c64b395dea025))
* respect the `client.logging` option for HMR logging ([#3159](https://github.com/webpack/webpack-dev-server/issues/3159)) ([6f3c6ba](https://github.com/webpack/webpack-dev-server/commit/6f3c6bacb1b7f6eae95e5b688dc22b5a42628360))
* respect `client.needClientEntry` and `client.needHotEntry` options ([#3178](https://github.com/webpack/webpack-dev-server/issues/3178)) ([a2b6db9](https://github.com/webpack/webpack-dev-server/commit/a2b6db9417eb289a488584e8b244fcedc416ac56))
* overlay with warnings ([#3215](https://github.com/webpack/webpack-dev-server/issues/3215)) ([7e18161](https://github.com/webpack/webpack-dev-server/commit/7e181618ba7a8ce995bf39ded00a789a9714a14b))
* help description for options
* error description for options
* improve warning message for the `open` option

## [4.0.0-beta.2](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-beta.1...v4.0.0-beta.2) (2021-04-06)


### ⚠ BREAKING CHANGES

* the `openPage` option and the `--open-page` CLI option were removed in favor `{ open: ['/my-page', '/my-other-page/'] }` for Node.js API and `--open-target [URL]` (without `[URL]` dev server will open a browser using the `host` option value) and `--open-app <browser>` for CLI
* the `useLocalIp` option was removed in favor `{ host: 'local-ip' }`, alternative you can provide values: `local-ipv4` for IPv4 and `local-ipv6` for IPv6
* `stdin` option was removed in favor `--watch-options-stdin`
* `injectClient` and `injectHot` was removed in favor `client.needClientEntry` and `client.needHotEntry`

### Features

* added the `watchFiles` option, now you can reload server on file changes, for example `{ watchFiles: ['src/**/*.php', 'public/**/*'] }` ([#3136](https://github.com/webpack/webpack-dev-server/issues/3136)) ([d73213a](https://github.com/webpack/webpack-dev-server/commit/d73213ab04b9cae38364a0c68dfc3bdfd8df227f))
* added more CLI options, please run `webpack server --help` ([#3148](https://github.com/webpack/webpack-dev-server/issues/3148)) ([03a2b27](https://github.com/webpack/webpack-dev-server/commit/03a2b27011098b6b98b3d20c4c46a949c4f05355))
* enable overlay by default ([#3108](https://github.com/webpack/webpack-dev-server/issues/3108)) ([5e05e48](https://github.com/webpack/webpack-dev-server/commit/5e05e48a56232038c1341f2c0deae3d35a1add47))
* you can specify multiple targets and browsers for the `open` option, i.e. `{ open: { target: ['/my-page', '/my-other-page'], app: ['google-chrome', '--incognito'] } }` ([e3c2683](https://github.com/webpack/webpack-dev-server/commit/e3c26835fae88a478baad477d537bd0ff1424db9))


### Bug Fixes

* `/webpack-dev-server` url shows list of files ([#3101](https://github.com/webpack/webpack-dev-server/issues/3101)) ([b3374c3](https://github.com/webpack/webpack-dev-server/commit/b3374c3ec2e07e4ba41e4ef40beaff5b9da2eccc))
* dev server client compatibility with `IE11`/`IE10`/`IE9` ([#3129](https://github.com/webpack/webpack-dev-server/issues/3129)) ([1e3e656](https://github.com/webpack/webpack-dev-server/commit/1e3e656b5871456a483401f829a4dd4e67d48863))

  * For `IE11`/`IE10` you need polyfill `fetch()` and `Promise`, example:
  
  ```js
  module.exports = {
    entry: {
      entry: [
        "whatwg-fetch", 
        "core-js/features/promise", 
        "./entry.js"
      ],
    },
  };
  ```
  
  * For `IE9` you need polyfill `fetch()` and `Promise` and use `sockjs` for communications (because `WebSocket` is not supported), example:
  
  ```js
  module.exports = {
    entry: {
      entry: [
        "whatwg-fetch", 
        "core-js/features/promise", 
        "./entry.js"
      ],
    },
    devServer: {
      transportMode: "sockjs",
    },
  };
  ```
  
  IE8 is not supported

* hostname resolving ([#3128](https://github.com/webpack/webpack-dev-server/issues/3128)) ([cd39491](https://github.com/webpack/webpack-dev-server/commit/cd39491ea395c985f2014dfc03379db5c894f711))
* improve CLI options ([#3151](https://github.com/webpack/webpack-dev-server/issues/3151)) ([09fa827](https://github.com/webpack/webpack-dev-server/commit/09fa827c0abbce271fa70f3553b004ff64d16b32))
* output description on invalid options ([#3154](https://github.com/webpack/webpack-dev-server/issues/3154)) ([2e02978](https://github.com/webpack/webpack-dev-server/commit/2e02978f921ebdbda020f746f35c86048de9b2ee))
* prefer to open the `host` option ([#3115](https://github.com/webpack/webpack-dev-server/issues/3115)) ([7e525eb](https://github.com/webpack/webpack-dev-server/commit/7e525ebe35201996d047d14af05709b0b082ae7a))
* reduce number of `dependencies`

## [4.0.0-beta.1](https://github.com/webpack/webpack-dev-server/compare/v4.0.0-beta.0...v4.0.0-beta.1) (2021-03-23)


### ⚠ BREAKING CHANGES

* `--hot-only` option was removed
* default value of the `static` option is `path.resolve(process.cwd(), 'public')`, previously `path.resolve(process.cwd(), 'static')`
* the `overlay` option was moved into the `client` option

### Features

* add more negative flags - `--no-https`, `--no-http2`, `--no-compress` and `--no-history-api-fallback` ([#3070](https://github.com/webpack/webpack-dev-server/issues/3070)) ([ebc966f](https://github.com/webpack/webpack-dev-server/commit/ebc966f398c38c23c6d36b4be47f303ddfd29e7d))
* allow `Boolean` type for the `--firewall` option ([#3041](https://github.com/webpack/webpack-dev-server/issues/3041)) ([6711c1d](https://github.com/webpack/webpack-dev-server/commit/6711c1dd175820d781eac0cad6287582e8def950))
* improve output for localhost and fix open ([#2892](https://github.com/webpack/webpack-dev-server/issues/2892)) ([9e65c24](https://github.com/webpack/webpack-dev-server/commit/9e65c24214666241334b89c9e070f4d03bb0f317))
* improve output for IPv4 and IPv6 ([#3092](https://github.com/webpack/webpack-dev-server/issues/3092)) ([f362665](https://github.com/webpack/webpack-dev-server/commit/f3626654f7af58c159971b4059a741c25ce58249))


### Bug Fixes

* allow to open browser with `--open-page` ([#3032](https://github.com/webpack/webpack-dev-server/issues/3032)) ([581ee07](https://github.com/webpack/webpack-dev-server/commit/581ee07b0c511cabb6c531d8a680fdcdfafbc003))
* content security policy issue in client log ([2de2e01](https://github.com/webpack/webpack-dev-server/commit/2de2e010005f0424f872950abf6155b4aa9a1963))
* empty and multiple entries support ([#2920](https://github.com/webpack/webpack-dev-server/issues/2920)) ([45f6592](https://github.com/webpack/webpack-dev-server/commit/45f65923ac808d77a70b3fd695cf3deeab0b6585))
* improve descriptions for CLI options ([#3021](https://github.com/webpack/webpack-dev-server/issues/3021)) ([7d339d4](https://github.com/webpack/webpack-dev-server/commit/7d339d40a74842cbeae0b9c8ef20147af3a0f468))
* improve descriptions for negative flags ([#3029](https://github.com/webpack/webpack-dev-server/issues/3029)) ([2e2190a](https://github.com/webpack/webpack-dev-server/commit/2e2190a4c54ddebafc729857e5650772635a50ec))
* multi compiler mode with proxy ([#2905](https://github.com/webpack/webpack-dev-server/issues/2905)) ([247a92b](https://github.com/webpack/webpack-dev-server/commit/247a92b90c105a2e29432de4de8a32d147139c42))
* remove double brackets from the ws url when using raw IPv6 address ([#2951](https://github.com/webpack/webpack-dev-server/issues/2951)) ([2ec8160](https://github.com/webpack/webpack-dev-server/commit/2ec81605127cec82fae5064dd59da2798a628e02))
* show correct url in output status ([#3013](https://github.com/webpack/webpack-dev-server/issues/3013)) ([06b3d91](https://github.com/webpack/webpack-dev-server/commit/06b3d91918ed87c2b18f8df0ae4b6a5edee06137))
* show detailed error in overlay ([ba01b05](https://github.com/webpack/webpack-dev-server/commit/ba01b051d3455d99fa88a8dd3279e74e420b2f42))
* support `file:` and `chrome-extension:` protocols in client ([#2954](https://github.com/webpack/webpack-dev-server/issues/2954)) ([163bdce](https://github.com/webpack/webpack-dev-server/commit/163bdce5f067dd5bd1ed138b764657f8465586eb))
* warnings in overlay ([#3054](https://github.com/webpack/webpack-dev-server/issues/3054)) ([6144c8d](https://github.com/webpack/webpack-dev-server/commit/6144c8dabd144413d4e86bfb0cd9d82d7363fb9d))
* webpack-cli installation message ([#2955](https://github.com/webpack/webpack-dev-server/issues/2955)) ([b9ce07f](https://github.com/webpack/webpack-dev-server/commit/b9ce07fd83a53a1047c2f0f1f49d511aef2f7b29))


## [4.0.0-beta.0](https://github.com/webpack/webpack-dev-server/compare/v3.11.0...v4.0.0-beta.0) (2020-11-27)

### ⚠ BREAKING CHANGES

* drop support `Node.js@6` and `Node.js@8`, minimum supported `Node.js` version is `Node@10`
* the `hot` option is `true` by default
* the `hotOnly` option was removed, if you need hot only mode, use `hot: 'only'` value
* the default `transportMode` is switched from `sockjs` to `ws` (IE 11 and other old browsers doesn't support WebSocket, set `sockjs` value for `transportMode` if you need supports IE 11)
* `before`, `after` and `setup` were removed in favor `onBeforeSetupMiddleware` (previously `before`) and `onAfterSetupMiddleware` options (previously `after`)
* the `clientOptions` was renamed to the `client` option
* the `key`, `cert`, `pfx`, `pfx-passphrase`, `cacert`, `ca` and `requestCert` options were moved to `https` options, please use `https.{key|cert|pfx|passphrase|requestCert|cacert|ca|requestCert}`
* the `sockHost`, `sockPath` and `sockPort` options were removed in `client` option
* the `inline` option (`iframe` live mode) was removed
* the `lazy` and `filename` options were removed
* the `features` option was removed
* the `log`, `logLevel`, `logTime`, `noInfo`, `quiet`, `reporter` and `warn` options were removed in favor of built-in webpack logger, please read [this](https://webpack.js.org/configuration/other-options/#infrastructurelogginglevel) to enable and setup logging output
* the `fs`, `index`, `mimeTypes`, `publicPath`, `serverSideRender`, and `writeToDisk` options were moved in the `dev` option (`webpack-dev-middleware` options)
* updating `webpack-dev-middleware` to v4, which includes many breaking options changes, please [read](https://github.com/webpack/webpack-dev-middleware/releases)
* the `stats` option was removed, please use the [`stats`](https://webpack.js.org/configuration/stats/) option from `webpack.config.js`
* the `socket` option was removed
* the `contentBase`, `contentBasePublicPath`, `serveIndex`, `staticOptions`, `watchContentBase`, `watchOptions` were removed in favor of the `static` option
* the `disableHostCheck` and `allowedHosts` options were removed in favor of the `firewall` option
* `server.listen()` will find free port if the `port` is not set and the `port` argument is not passed, also print a warning if the `port` option and the `port` argument passed to `server.listen()` are different
* the `progress` option is moved to the `client` option, set `client: {progress: true}`
* the `profile` option was removed, to print profile data, set `client: { progress: 'profile' }`
* client uses the port of the current location (`location.port`, equivalent to `sockPort: 'location'`), by default. To get previously behavior, set the `client.port` with the port you'd like to set
* client uses the hostname of the current location (`location.hostname`), by default. To get previously behavior, set the `client.host` with the hostname you'd like to set

### Features

* compatibility with `webpack@5`
* compatibility with `webpack-cli@4`
* added the `setupExitSignals` option, it takes a boolean and if true (default on CLI), the server will close and exit the process on SIGINT and SIGTERM
* update `chokidar` to v3

### Notes

Unfortunately, due to the huge amount of changes it is very difficult to display all changes in a convenient form. Therefore, we offer you a couple of popular examples (feel free to send a PR with more examples).

#### `static`

Previously `contentBase`, `contentBasePublicPath`, `serveIndex`, `staticOptions`, `watchContentBase` and `watchOptions`

```js
module.exports = {
  // ...
  devServer: {
    // Can be:
    // static: path.resolve(__dirname, 'static')
    // static: false
    static: [
      // Simple example
      path.resolve(__dirname, "static"),
      // Complex example
      {
        directory: path.resolve(__dirname, "static"),
        staticOptions: {},
        // Don't be confused with `dev.publicPath`, it is `publicPath` for static directory
        // Can be:
        // publicPath: ['/static-public-path-one/', '/static-public-path-two/'],
        publicPath: "/static-public-path/",
        // Can be:
        // serveIndex: {} (options for the `serveIndex` option you can find https://github.com/expressjs/serve-index)
        serveIndex: true,
        // Can be:
        // watch: {} (options for the `watch` option you can find https://github.com/paulmillr/chokidar)
        watch: true,
      },
    ],
  },
};
```

#### `publicPath`

```js
module.exports = {
  // ...
  devServer: {
    dev: {
      publicPath: "/publicPathForDevServe",
    },
  },
};
```

#### `firewall`

Previously `disableHostCheck` and `allowedHosts`

```js
module.exports = {
  // ...
  devServer: {
    // Can be
    // firewall: ['192.168.0.1', 'domain.com']
    firewall: false,
  },
};
```

#### logging

```js
module.exports = {
  // ...
  infrastructureLogging: {
    // Only warnings and errors
    // level: 'none' disable logging
    // Please read https://webpack.js.org/configuration/other-options/#infrastructurelogginglevel
    level: "warn",
  },
};
```

## [3.11.0](https://github.com/webpack/webpack-dev-server/compare/v3.10.3...v3.11.0) (2020-05-08)


### Features

* add icons for directory viewer ([#2441](https://github.com/webpack/webpack-dev-server/issues/2441)) ([e953d01](https://github.com/webpack/webpack-dev-server/commit/e953d01ca93764dabe38cedad8e7b9ef4e7f04bc))
* allow multiple `contentBasePublicPath` paths ([#2489](https://github.com/webpack/webpack-dev-server/issues/2489)) ([c6bdfe4](https://github.com/webpack/webpack-dev-server/commit/c6bdfe4afb2ce3612c02142954c68a8e657c3915))
* emit progress-update ([#2498](https://github.com/webpack/webpack-dev-server/issues/2498)) ([4808abd](https://github.com/webpack/webpack-dev-server/commit/4808abd434bac0511da688aee861f7e2d8b0c81c)), closes [#1666](https://github.com/webpack/webpack-dev-server/issues/1666)
* add invalidate endpoint ([#2493](https://github.com/webpack/webpack-dev-server/issues/2493)) ([89ffb86](https://github.com/webpack/webpack-dev-server/commit/89ffb86cd26425c59e3937ca06a2c804a01b8f1d))
* allow open option to accept an object ([#2492](https://github.com/webpack/webpack-dev-server/issues/2492)) ([adeb92e](https://github.com/webpack/webpack-dev-server/commit/adeb92e1e37551a6cbf3063942d6c2c7efbdff10))


### Bug Fixes

* do not swallow errors from server ([#2512](https://github.com/webpack/webpack-dev-server/issues/2512)) ([06583f2](https://github.com/webpack/webpack-dev-server/commit/06583f268b70f4a9715e4b747b1557055c419086))
* security vulnerability in yargs-parser ([#2566](https://github.com/webpack/webpack-dev-server/issues/2566)) ([41d1d0c](https://github.com/webpack/webpack-dev-server/commit/41d1d0cf99f53df0569991a85489d3c8bc095af5))
* don't crash on setupExitSignals(undefined) ([#2507](https://github.com/webpack/webpack-dev-server/issues/2507)) ([0d5c681](https://github.com/webpack/webpack-dev-server/commit/0d5c68143d780e631cdaf09081822fc87d7cb3ba))
* support entry descriptor (closes [#2453](https://github.com/webpack/webpack-dev-server/issues/2453)) ([#2465](https://github.com/webpack/webpack-dev-server/issues/2465)) ([8bbef6a](https://github.com/webpack/webpack-dev-server/commit/8bbef6adf6ae5f6a3109ecd4a6246223d2f77cb2))
* update jquery ([#2516](https://github.com/webpack/webpack-dev-server/issues/2516)) ([99ccfd8](https://github.com/webpack/webpack-dev-server/commit/99ccfd84d1db566aa4ed77c441c4674bc4e986df))

### [3.10.3](https://github.com/webpack/webpack-dev-server/compare/v3.10.2...v3.10.3) (2020-02-05)


### Bug Fixes

* forward error requests to the proxy ([#2425](https://github.com/webpack/webpack-dev-server/issues/2425)) ([e291cd4](https://github.com/webpack/webpack-dev-server/commit/e291cd4922f66c5c69dfd1fd3839812cfa502de5))

### [3.10.2](https://github.com/webpack/webpack-dev-server/compare/v3.10.0...v3.10.2) (2020-01-31)


### Bug Fixes

* fallthrough non `GET` and `HEAD` request to routes ([#2374](https://github.com/webpack/webpack-dev-server/issues/2374)) ([ebe8eca](https://github.com/webpack/webpack-dev-server/commit/ebe8eca37957a9009f8627e7dfb82699606846de))
* add an optional peer dependency on webpack-cli ([#2396](https://github.com/webpack/webpack-dev-server/issues/2396)) ([aa365df](https://github.com/webpack/webpack-dev-server/commit/aa365dfd7e86c5dca31304bd5dcfe9bb9b767b40))
* add heartbeat for the websocket server ([#2404](https://github.com/webpack/webpack-dev-server/issues/2404)) ([1a7c827](https://github.com/webpack/webpack-dev-server/commit/1a7c8273de5a5b164c63c9919950babd7ecfaadb))

### [3.10.1](https://github.com/webpack/webpack-dev-server/compare/v3.10.0...v3.10.1) (2019-12-19)


### Bug Fixes

* ie11 compatibility ([1306abe](https://github.com/webpack/webpack-dev-server/commit/1306abeb8c5fd125952cdc177fdf38c2c31b3c4f))

## [3.10.0](https://github.com/webpack/webpack-dev-server/compare/v3.9.0...v3.10.0) (2019-12-18)


### Features

* **client:** allow sock port to use location's port (`sockPort: 'location'`) ([#2341](https://github.com/webpack/webpack-dev-server/issues/2341)) ([dc10d06](https://github.com/webpack/webpack-dev-server/commit/dc10d0647413ad57814b684b5f6ef3659531f0f6))
* **server:** add `contentBasePublicPath` option ([#2150](https://github.com/webpack/webpack-dev-server/issues/2150)) ([cee700d](https://github.com/webpack/webpack-dev-server/commit/cee700d59aff644a499ee310c4a32d5c5693e559))


### Bug Fixes

* **client:** don't override protocol for socket connection to 127.0.0.1 ([#2303](https://github.com/webpack/webpack-dev-server/issues/2303)) ([3a31917](https://github.com/webpack/webpack-dev-server/commit/3a31917a02818dabb3dc549e3e4994618475d131)), closes [#2302](https://github.com/webpack/webpack-dev-server/issues/2302)
* **server:** respect sockPath on transportMode: 'ws' ([#2310](https://github.com/webpack/webpack-dev-server/issues/2310)) ([#2311](https://github.com/webpack/webpack-dev-server/issues/2311)) ([e188542](https://github.com/webpack/webpack-dev-server/commit/e188542d888dbb55be64c9da2f747343b73c319f))
* https on chrome linux ([#2330](https://github.com/webpack/webpack-dev-server/issues/2330)) ([dc8b475](https://github.com/webpack/webpack-dev-server/commit/dc8b47510e24649edb38e5a07579be389898189e))
* support webpack@5 ([#2359](https://github.com/webpack/webpack-dev-server/issues/2359)) ([8f89c01](https://github.com/webpack/webpack-dev-server/commit/8f89c0188579a419dc68021f8bc0fbeae70cbe5d))

## [3.9.0](https://github.com/webpack/webpack-dev-server/compare/v3.8.2...v3.9.0) (2019-10-22)


### Bug Fixes

* add `hostname` and `port` to bonjour name to prevent name collisions ([#2276](https://github.com/webpack/webpack-dev-server/issues/2276)) ([d8af2d9](https://github.com/webpack/webpack-dev-server/commit/d8af2d9))
* add `extKeyUsage` to self-signed cert ([#2274](https://github.com/webpack/webpack-dev-server/issues/2274)) ([a4dbc3b](https://github.com/webpack/webpack-dev-server/commit/a4dbc3b))


### Features

* add multiple `openPage` support ([#2266](https://github.com/webpack/webpack-dev-server/issues/2266)) ([c9e9178](https://github.com/webpack/webpack-dev-server/commit/c9e9178))

### [3.8.2](https://github.com/webpack/webpack-dev-server/compare/v3.8.1...v3.8.2) (2019-10-02)

### Security

* update `selfsigned` package

### [3.8.1](https://github.com/webpack/webpack-dev-server/compare/v3.8.0...v3.8.1) (2019-09-16)


### Bug Fixes

* add null check for connection.headers ([#2200](https://github.com/webpack/webpack-dev-server/issues/2200)) ([7964997](https://github.com/webpack/webpack-dev-server/commit/7964997))
* false positive for an absolute path in the `ContentBase` option on windows ([#2202](https://github.com/webpack/webpack-dev-server/issues/2202)) ([68ecf78](https://github.com/webpack/webpack-dev-server/commit/68ecf78))
* add status in quiet log level ([#2235](https://github.com/webpack/webpack-dev-server/issues/2235)) ([7e2224e](https://github.com/webpack/webpack-dev-server/commit/7e2224e))
* scriptHost in client ([#2246](https://github.com/webpack/webpack-dev-server/issues/2246)) ([00903f6](https://github.com/webpack/webpack-dev-server/commit/00903f6))

## [3.8.0](https://github.com/webpack/webpack-dev-server/compare/v3.7.2...v3.8.0) (2019-08-09)


### Bug Fixes

* **server:** fix setupExitSignals usage ([#2181](https://github.com/webpack/webpack-dev-server/issues/2181)) ([bbe410e](https://github.com/webpack/webpack-dev-server/commit/bbe410e))
* **server:** set port before instantiating server ([#2143](https://github.com/webpack/webpack-dev-server/issues/2143)) ([cfbf229](https://github.com/webpack/webpack-dev-server/commit/cfbf229))
* check for name of HotModuleReplacementPlugin to avoid RangeError ([#2146](https://github.com/webpack/webpack-dev-server/issues/2146)) ([4579775](https://github.com/webpack/webpack-dev-server/commit/4579775))
* **server:** check for external urls in array ([#1980](https://github.com/webpack/webpack-dev-server/issues/1980)) ([fa78347](https://github.com/webpack/webpack-dev-server/commit/fa78347))
* **server:** fix header check for socket server ([#2077](https://github.com/webpack/webpack-dev-server/issues/2077)) ([7f51859](https://github.com/webpack/webpack-dev-server/commit/7f51859))
* **server:** stricter headers security check ([#2092](https://github.com/webpack/webpack-dev-server/issues/2092)) ([078ddca](https://github.com/webpack/webpack-dev-server/commit/078ddca))


### Features

* **server:** add transportMode ([#2116](https://github.com/webpack/webpack-dev-server/issues/2116)) ([b5b9cb4](https://github.com/webpack/webpack-dev-server/commit/b5b9cb4))
* **server:** serverMode 'ws' option ([#2082](https://github.com/webpack/webpack-dev-server/issues/2082)) ([04483f4](https://github.com/webpack/webpack-dev-server/commit/04483f4))
* **server/client:** made progress option available to API ([#1961](https://github.com/webpack/webpack-dev-server/issues/1961)) ([56274e4](https://github.com/webpack/webpack-dev-server/commit/56274e4))

### Potential Breaking changes

We have migrated `serverMode` and `clientMode` to `transportMode` as an experimental option. If you want to use this feature, you have to change your settings. 

Related PR: https://github.com/webpack/webpack-dev-server/pull/2116


### [3.7.2](https://github.com/webpack/webpack-dev-server/compare/v3.7.1...v3.7.2) (2019-06-17)


### Bug Fixes

* **client:** add default fallback for client ([#2015](https://github.com/webpack/webpack-dev-server/issues/2015)) ([d26b444](https://github.com/webpack/webpack-dev-server/commit/d26b444))
* **open:** set `wait: false` to run server.close successfully ([#2001](https://github.com/webpack/webpack-dev-server/issues/2001)) ([2b4cb52](https://github.com/webpack/webpack-dev-server/commit/2b4cb52))
* **test:** fixed ProvidePlugin.test.js ([#2002](https://github.com/webpack/webpack-dev-server/issues/2002)) ([47453cb](https://github.com/webpack/webpack-dev-server/commit/47453cb))



### [3.7.1](https://github.com/webpack/webpack-dev-server/compare/v3.7.0...v3.7.1) (2019-06-07)


### Bug Fixes

* retry finding port when port is null and get ports in sequence ([#1993](https://github.com/webpack/webpack-dev-server/issues/1993)) ([bc57514](https://github.com/webpack/webpack-dev-server/commit/bc57514))



## [3.7.0](https://github.com/webpack/webpack-dev-server/compare/v3.6.0...v3.7.0) (2019-06-06)


### Bug Fixes

* change clientLogLevel order to be called first ([#1973](https://github.com/webpack/webpack-dev-server/issues/1973)) ([57c8c92](https://github.com/webpack/webpack-dev-server/commit/57c8c92))
* es6 syntax in client ([#1982](https://github.com/webpack/webpack-dev-server/issues/1982)) ([802aa30](https://github.com/webpack/webpack-dev-server/commit/802aa30))



## [3.6.0](https://github.com/webpack/webpack-dev-server/compare/v3.5.1...v3.6.0) (2019-06-05)


### Bug Fixes

* **config:** enable `--overlay` ([#1968](https://github.com/webpack/webpack-dev-server/issues/1968)) ([dc81e23](https://github.com/webpack/webpack-dev-server/commit/dc81e23))
* **server:** don't ignore node_modules by default ([#1970](https://github.com/webpack/webpack-dev-server/issues/1970)) ([699f8b4](https://github.com/webpack/webpack-dev-server/commit/699f8b4)), closes [#1794](https://github.com/webpack/webpack-dev-server/issues/1794)


### Features

* **server:** add serverMode option ([#1937](https://github.com/webpack/webpack-dev-server/issues/1937)) ([44a8cde](https://github.com/webpack/webpack-dev-server/commit/44a8cde))



### [3.5.1](https://github.com/webpack/webpack-dev-server/compare/v3.5.0...v3.5.1) (2019-06-01)


### Bug Fixes

* allow passing promise function of webpack.config.js ([#1947](https://github.com/webpack/webpack-dev-server/issues/1947)) ([8cf1053](https://github.com/webpack/webpack-dev-server/commit/8cf1053))



## [3.5.0](https://github.com/webpack/webpack-dev-server/compare/v3.4.1...v3.5.0) (2019-05-31)


### Bug Fixes

* add client code for `electron-renderer` target ([#1935](https://github.com/webpack/webpack-dev-server/issues/1935)) ([9297988](https://github.com/webpack/webpack-dev-server/commit/9297988))
* add client code for `node-webkit` target ([#1942](https://github.com/webpack/webpack-dev-server/issues/1942)) ([c6b2b1f](https://github.com/webpack/webpack-dev-server/commit/c6b2b1f))


### Features

* **server:** `onListening` option ([#1930](https://github.com/webpack/webpack-dev-server/issues/1930)) ([61d0cdf](https://github.com/webpack/webpack-dev-server/commit/61d0cdf))
* **server:** add callback support for invalidate ([#1900](https://github.com/webpack/webpack-dev-server/issues/1900)) ([cd218ef](https://github.com/webpack/webpack-dev-server/commit/cd218ef))
* **server:** add `WEBPACK_DEV_SERVER` env variable ([#1929](https://github.com/webpack/webpack-dev-server/issues/1929)) ([856169e](https://github.com/webpack/webpack-dev-server/commit/856169e))



### [3.4.1](https://github.com/webpack/webpack-dev-server/compare/v3.4.0...v3.4.1) (2019-05-17)


### Bug Fixes

* add none and warning to clientLogLevel ([#1901](https://github.com/webpack/webpack-dev-server/issues/1901)) ([0ae9be8](https://github.com/webpack/webpack-dev-server/commit/0ae9be8))
* broken hot reload ([#1903](https://github.com/webpack/webpack-dev-server/issues/1903)) ([6a444cd](https://github.com/webpack/webpack-dev-server/commit/6a444cd))



## [3.4.0](https://github.com/webpack/webpack-dev-server/compare/v3.3.1...v3.4.0) (2019-05-17)


### Bug Fixes

* don't use self.location.port ([#1838](https://github.com/webpack/webpack-dev-server/issues/1838)) ([6d31984](https://github.com/webpack/webpack-dev-server/commit/6d31984))
* do not include config files in dist ([#1883](https://github.com/webpack/webpack-dev-server/issues/1883)) ([c535bb2](https://github.com/webpack/webpack-dev-server/commit/c535bb2))
* only add client entry to web targets ([#1775](https://github.com/webpack/webpack-dev-server/issues/1775)) ([cf4d0d0](https://github.com/webpack/webpack-dev-server/commit/cf4d0d0))
* update clientLogLevel to match docs and error ([#1825](https://github.com/webpack/webpack-dev-server/issues/1825)) ([7f52bbf](https://github.com/webpack/webpack-dev-server/commit/7f52bbf))
* add errors-warnings preset ([#1895](https://github.com/webpack/webpack-dev-server/issues/1895)) ([2a81ad2](https://github.com/webpack/webpack-dev-server/commit/2a81ad2))


### Features

* added injectClient option ([#1775](https://github.com/webpack/webpack-dev-server/issues/1775)) ([cf4d0d0](https://github.com/webpack/webpack-dev-server/commit/cf4d0d0))
* added injectHot option ([#1775](https://github.com/webpack/webpack-dev-server/issues/1775)) ([cf4d0d0](https://github.com/webpack/webpack-dev-server/commit/cf4d0d0))
* added sockPort option ([#1792](https://github.com/webpack/webpack-dev-server/issues/1792)) ([58d1682](https://github.com/webpack/webpack-dev-server/commit/58d1682))
* added sockHost option ([#1858](https://github.com/webpack/webpack-dev-server/issues/1858)) ([f47dff2](https://github.com/webpack/webpack-dev-server/commit/f47dff2))
* support HEAD method ([#1875](https://github.com/webpack/webpack-dev-server/issues/1875)) ([c2360e4](https://github.com/webpack/webpack-dev-server/commit/c2360e4))
* added liveReload option ([#1889](https://github.com/webpack/webpack-dev-server/issues/1889)) ([fc4fe32](https://github.com/webpack/webpack-dev-server/commit/fc4fe32))
* update express to 4.17 version


## [3.3.1](https://github.com/webpack/webpack-dev-server/compare/v3.3.0...v3.3.1) (2019-04-09)


### Bug Fixes

* **regression:** always get necessary stats for hmr ([#1780](https://github.com/webpack/webpack-dev-server/issues/1780)) ([66b04a9](https://github.com/webpack/webpack-dev-server/commit/66b04a9))
* **regression:** host and port can be undefined or null ([#1779](https://github.com/webpack/webpack-dev-server/issues/1779)) ([028ceee](https://github.com/webpack/webpack-dev-server/commit/028ceee))
* only add entries after compilers have been created ([#1774](https://github.com/webpack/webpack-dev-server/issues/1774)) ([b31cbaa](https://github.com/webpack/webpack-dev-server/commit/b31cbaa))



# [3.3.0](https://github.com/webpack/webpack-dev-server/compare/v3.2.1...v3.3.0) (2019-04-08)


### Bug Fixes

* compatibility with webpack-cli@3.3 ([#1754](https://github.com/webpack/webpack-dev-server/issues/1754)) ([fd7cb0d](https://github.com/webpack/webpack-dev-server/commit/fd7cb0d))
* ignore proxy when bypass return false ([#1696](https://github.com/webpack/webpack-dev-server/issues/1696)) ([aa7de77](https://github.com/webpack/webpack-dev-server/commit/aa7de77))
* respect stats option from webpack config ([#1665](https://github.com/webpack/webpack-dev-server/issues/1665)) ([efaa740](https://github.com/webpack/webpack-dev-server/commit/efaa740))
* use location.port when location.hostname is used to infer HMR socket URL ([#1664](https://github.com/webpack/webpack-dev-server/issues/1664)) ([2f7f052](https://github.com/webpack/webpack-dev-server/commit/2f7f052))
* don't crash with express.static.mime.types ([#1765](https://github.com/webpack/webpack-dev-server/issues/1765)) ([919ff77](https://github.com/webpack/webpack-dev-server/commit/919ff77))


### Features

* add option "serveIndex" to enable/disable serveIndex middleware ([#1752](https://github.com/webpack/webpack-dev-server/issues/1752)) ([d5d60cb](https://github.com/webpack/webpack-dev-server/commit/d5d60cb))
* add webpack as argument to before and after options ([#1760](https://github.com/webpack/webpack-dev-server/issues/1760)) ([0984d4b](https://github.com/webpack/webpack-dev-server/commit/0984d4b))
* http2 option to enable/disable HTTP/2 with HTTPS ([#1721](https://github.com/webpack/webpack-dev-server/issues/1721)) ([dcd2434](https://github.com/webpack/webpack-dev-server/commit/dcd2434))
* random port retry logic ([#1692](https://github.com/webpack/webpack-dev-server/issues/1692)) ([419f02e](https://github.com/webpack/webpack-dev-server/commit/419f02e))
* relax depth limit from chokidar for content base ([#1697](https://github.com/webpack/webpack-dev-server/issues/1697)) ([7ea9ab9](https://github.com/webpack/webpack-dev-server/commit/7ea9ab9))



## [3.2.1](https://github.com/webpack/webpack-dev-server/compare/v3.2.0...v3.2.1) (2019-02-25)


### Bug Fixes

* deprecation message about `setup` now warning about `v4` ([#1684](https://github.com/webpack/webpack-dev-server/issues/1684)) ([523a6ec](https://github.com/webpack/webpack-dev-server/commit/523a6ec))
* **regression:** allow `ca`, `key` and `cert` will be string ([#1676](https://github.com/webpack/webpack-dev-server/issues/1676)) ([b8d5c1e](https://github.com/webpack/webpack-dev-server/commit/b8d5c1e))
* **regression:** handle `key`, `cert`, `cacert` and `pfx` in CLI ([#1688](https://github.com/webpack/webpack-dev-server/issues/1688)) ([4b2076c](https://github.com/webpack/webpack-dev-server/commit/4b2076c))
* **regression:** problem with `idb-connector` after update `internal-ip` ([#1691](https://github.com/webpack/webpack-dev-server/issues/1691)) ([eb48691](https://github.com/webpack/webpack-dev-server/commit/eb48691))



<a name="3.1.14"></a>
## [3.1.14](https://github.com/webpack/webpack-dev-server/compare/v3.1.13...v3.1.14) (2018-12-24)


### Bug Fixes

* add workaround for Origin header in sockjs ([#1608](https://github.com/webpack/webpack-dev-server/issues/1608)) ([1dfd4fb](https://github.com/webpack/webpack-dev-server/commit/1dfd4fb))



<a name="3.1.13"></a>
## [3.1.13](https://github.com/webpack/webpack-dev-server/compare/v3.1.12...v3.1.13) (2018-12-22)


### Bug Fixes

* delete a comma for Node.js <= v7.x ([#1609](https://github.com/webpack/webpack-dev-server/issues/1609)) ([0bab1c0](https://github.com/webpack/webpack-dev-server/commit/0bab1c0))



<a name="3.1.12"></a>
## [3.1.12](https://github.com/webpack/webpack-dev-server/compare/v3.1.11...v3.1.12) (2018-12-22)


### Bug Fixes

* regression in `checkHost` for checking Origin header ([#1606](https://github.com/webpack/webpack-dev-server/issues/1606)) ([8bb3ca8](https://github.com/webpack/webpack-dev-server/commit/8bb3ca8))



<a name="3.1.11"></a>
## [3.1.11](https://github.com/webpack/webpack-dev-server/compare/v3.1.10...v3.1.11) (2018-12-21)


### Bug Fixes

* **bin/options:** correct check for color support (`options.color`) ([#1555](https://github.com/webpack/webpack-dev-server/issues/1555)) ([55398b5](https://github.com/webpack/webpack-dev-server/commit/55398b5))
* **package:** update `spdy` v3.4.1...4.0.0 (assertion error) ([#1491](https://github.com/webpack/webpack-dev-server/issues/1491)) ([#1563](https://github.com/webpack/webpack-dev-server/issues/1563)) ([7a3a257](https://github.com/webpack/webpack-dev-server/commit/7a3a257))
* **Server:** correct `node` version checks ([#1543](https://github.com/webpack/webpack-dev-server/issues/1543)) ([927a2b3](https://github.com/webpack/webpack-dev-server/commit/927a2b3))
* **Server:** mime type for wasm in contentBase directory ([#1575](https://github.com/webpack/webpack-dev-server/issues/1575)) ([#1580](https://github.com/webpack/webpack-dev-server/issues/1580)) ([fadae5d](https://github.com/webpack/webpack-dev-server/commit/fadae5d))
* add url for compatibility with webpack@5 ([#1598](https://github.com/webpack/webpack-dev-server/issues/1598)) ([#1599](https://github.com/webpack/webpack-dev-server/issues/1599)) ([68dd49a](https://github.com/webpack/webpack-dev-server/commit/68dd49a))
* check origin header for websocket connection ([#1603](https://github.com/webpack/webpack-dev-server/issues/1603)) ([b3217ca](https://github.com/webpack/webpack-dev-server/commit/b3217ca))



<a name="3.1.10"></a>
## [3.1.10](https://github.com/webpack/webpack-dev-server/compare/v3.1.9...v3.1.10) (2018-10-23)


### Bug Fixes

* **options:** add `writeToDisk` option to schema ([#1520](https://github.com/webpack/webpack-dev-server/issues/1520)) ([d2f4902](https://github.com/webpack/webpack-dev-server/commit/d2f4902))
* **package:** update `sockjs-client` v1.1.5...1.3.0 (`url-parse` vulnerability) ([#1537](https://github.com/webpack/webpack-dev-server/issues/1537)) ([e719959](https://github.com/webpack/webpack-dev-server/commit/e719959))
* **Server:** set `tls.DEFAULT_ECDH_CURVE` to `'auto'` ([#1531](https://github.com/webpack/webpack-dev-server/issues/1531)) ([c12def3](https://github.com/webpack/webpack-dev-server/commit/c12def3))



<a name="3.1.9"></a>
## [3.1.9](https://github.com/webpack/webpack-dev-server/compare/v3.1.8...v3.1.9) (2018-09-24)



<a name="3.1.8"></a>
## [3.1.8](https://github.com/webpack/webpack-dev-server/compare/v3.1.7...v3.1.8) (2018-09-06)


### Bug Fixes

* **package:** `yargs` security vulnerability (`dependencies`) ([#1492](https://github.com/webpack/webpack-dev-server/issues/1492)) ([8fb67c9](https://github.com/webpack/webpack-dev-server/commit/8fb67c9))
* **utils/createLogger:** ensure `quiet` always takes precedence (`options.quiet`) ([#1486](https://github.com/webpack/webpack-dev-server/issues/1486)) ([7a6ca47](https://github.com/webpack/webpack-dev-server/commit/7a6ca47))



<a name="3.1.7"></a>
## [3.1.7](https://github.com/webpack/webpack-dev-server/compare/v3.1.6...v3.1.7) (2018-08-29)


### Bug Fixes

* **Server:** don't use `spdy` on `node >= v10.0.0` ([#1451](https://github.com/webpack/webpack-dev-server/issues/1451)) ([8ab9eb6](https://github.com/webpack/webpack-dev-server/commit/8ab9eb6))



<a name="3.1.6"></a>
## [3.1.6](https://github.com/webpack/webpack-dev-server/compare/v3.1.5...v3.1.6) (2018-08-26)


### Bug Fixes

* **bin:** handle `process` signals correctly when the server isn't ready yet ([#1432](https://github.com/webpack/webpack-dev-server/issues/1432)) ([334c3a5](https://github.com/webpack/webpack-dev-server/commit/334c3a5))
* **examples/cli:** correct template path in `open-page` example ([#1401](https://github.com/webpack/webpack-dev-server/issues/1401)) ([df30727](https://github.com/webpack/webpack-dev-server/commit/df30727))
* **schema:** allow the `output` filename to be a `{Function}` ([#1409](https://github.com/webpack/webpack-dev-server/issues/1409)) ([e2220c4](https://github.com/webpack/webpack-dev-server/commit/e2220c4))


================================================
FILE: CODE_OF_CONDUCT.md
================================================
## Code of Conduct

At webpack and webpack/webpack-dev-server repository we follow the [JSFoundation Code of Conduct][1].
Please adhere to the guidelines there and feel free to report any violation of them to the **@webpack/core-team**,
**@webpack/dev-server-team**, or <conduct@js.foundation>.

[1]: https://github.com/openjs-foundation/code-and-learn/blob/main/CODE_OF_CONDUCT.md


================================================
FILE: CONTRIBUTING.md
================================================
# Contributing to webpack-dev-server

Do you use webpack-dev-server and want to help us out? Thanks!

Please review this document before contributing.

Following these guidelines helps to communicate that you respect the time of the developers managing and developing this open source project. In return, they should show respect in addressing your issue or assessing patches and features.

## Core Ideas

- There are hooks to add your own features, so we should not add less-common features.
- The workflow should be to start webpack-dev-server as a separate process, next to the "normal" server and to request the script from this server or to proxy from dev-server to "normal" server (because webpack blocks the event queue too much while compiling which can affect "normal" server).
- A user should not try to implement stuff that accesses the webpack filesystem. This leads to bugs (the middleware does it while blocking requests until the compilation has finished, the blocking is important).
- It should be a development only tool. Compiling in production is bad, one should precompile and deliver the compiled assets.
- Processing options and stats display is delegated to webpack, so webpack-dev-server/middleware should not do much with it. This also helps us to keep up-to-date with webpack updates.
- The communication library (`SockJS`) should not be exposed to the user.

## Submitting a Pull Request

- Good pull requests, such as patches, improvements, and new features, are a fantastic help. They should remain focused in scope and not contain unrelated commits.

- It is advised to first create an issue (if there is not one already) before making a pull request. This way the maintainers can first discuss with you if they agree and it also helps with providing some context.

- Run the relevant [examples](https://github.com/webpack/webpack-dev-server/tree/main/examples) to see if all functionality still works. When introducing new functionality, also add an example. This helps the maintainers to understand it and check if it still works.

- Write tests.

- Follow the existing coding style.

- Make sure your PR's description contains GitHub's special keyword references that automatically close the related issue when the PR is merged. ([More info](https://github.com/blog/1506-closing-issues-via-pull-requests))

## Setting Up a Local Copy

1. Clone the repo with `git clone https://github.com/webpack/webpack-dev-server`.

2. Run `npm install` in the root `webpack-dev-server` folder.

3. Run `npm link && npm link webpack-dev-server` to link the current project to `node_modules`.

Once it is done, you can modify any file locally. In the `examples/` directory you'll find a lot of examples with instructions on how to run them. This can be very handy when testing if your code works.

If you are modifying a file in the `client/` directory, be sure to run `npm run build:client` after it. This will recompile the files.

## Commit message

Our commit messages format follows the [angular.js commits format](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits).

We don't use the scope. The template of a commit would look like this:

### Commit Message Format

Each commit message consists of a **header**, a **body** and a **footer**. The header has a special
format that includes a **type** and a **subject**:

```
<type>: <subject>
<BLANK LINE>
<body>
<BLANK LINE>
<footer>
```

This is the list of _type_ of commits that we accept:

- **build** : Changes that affect the build system or external dependencies (example scopes: typescript, webpack, npm).
- **chore** : Updating deps, docs, linting, etc.
- **ci** : Changes to our CI configuration files and scripts (example scopes: Travis, Circle, BrowserStack, SauceLabs)
- **docs** : Documentation only changes.
- **feat** : A new feature.
- **fix** : A bug fix.
- **perf** : A code change that improves performance.
- **refactor** : A code change that neither fixes a bug nor adds a feature.
- **revert** : Reverts the previous commit.
- **style** : Changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc).
- **test** : Adding missing tests or correcting existing tests.

The **header** is mandatory.

Any line of the commit message cannot be longer 100 characters. This allows the message to be easier
to read on GitHub as well as in several git tools.

For more information about what each part of the template means, head up to the documentation in the
[angular repo](https://github.com/angular/angular.js/blob/master/DEVELOPERS.md#commits).

### Example commit message

```
feat: improve output for IPv4 and IPv6
```

Mention breaking changes explicitly:

```
refactor: remove stdin option

BREAKING CHANGE: stdin option was removed
```

## Testing a Pull Request

Pull requests often need some real-world testing.

1. In your `package.json`, change the line with `webpack-dev-server` to:

```json
"webpack-dev-server": "<PATH>"
```

`<PATH>`:

- `github:webpack/webpack-dev-server#pull/<ID>/head`
  where `<ID>` is the ID of the pull request.

- `file:../path/to/local/webpack-dev-server/fork` is the path to your local repo, just make sure you hit the correct path

2. Run `npm install`.

3. Go to the `webpack-dev-server` module (`cd node_modules/webpack-dev-server`), and run `npm run build`.

The pull request is now ready to be tested.

## [Contributor License Agreement](https://openjsf.org/about/the-openjs-foundation-cla/)

When submitting your contribution, a CLA (Contributor License Agreement) bot will come by to verify that you signed the [CLA](https://cla.openjsf.org/). If it is your first time, it will link you to the right place to sign it. However, if you have committed your contributions using an email that is not the same as your email used on GitHub, the CLA bot can't accept your contribution.

Run `git config user.email` to see your Git email, and verify it with [your GitHub email](https://github.com/settings/emails).

---

_Many thanks to [create-react-app](https://github.com/facebook/create-react-app/blob/master/CONTRIBUTING.md) for the inspiration with this contributing guide_


================================================
FILE: DOCUMENTATION-v4.md
================================================
[webpack-dev-server](https://github.com/webpack/webpack-dev-server) can be used to quickly develop an application. See the [development guide](/guides/development/) to get started.

This page describes the options that affect the behavior of webpack-dev-server (short: dev-server) `v4.0.0+`. Migration guide from `v3` to `v4` can be found [here](https://github.com/webpack/webpack-dev-server/blob/main/migration-v4.md).

> **Warning**
>
> `webpack-dev-server v4.0.0+` requires `node >= v12.13.0`, `webpack >= v4.37.0` (but we recommend using `webpack >= v5.0.0`), and `webpack-cli >= v4.7.0`.

## devServer

`object`

This set of options is picked up by [webpack-dev-server](https://github.com/webpack/webpack-dev-server) and can be used to change its behavior in various ways. Here's a rudimentary example that gzips and serves everything from our `public/` directory in the project root:

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "public"),
    },
    compress: true,
    port: 9000,
  },
};
```

When the server is started, there will be a message prior to the list of resolved modules:

```bash
<i> [webpack-dev-server] Project is running at:
<i> [webpack-dev-server] Loopback: http://localhost:9000/
<i> [webpack-dev-server] On Your Network (IPv4): http://197.158.164.104:9000/
<i> [webpack-dev-server] On Your Network (IPv6): http://[fe80::1]:9000/
<i> [webpack-dev-server] Content not from webpack is served from '/path/to/public' directory
```

that will give some background on where the server is located and what it's serving.

If you're using dev-server through the Node.js API, the options in `devServer` will be ignored. Pass the options as the first parameter instead: `new WebpackDevServer({...}, compiler)`. [See here](https://github.com/webpack/webpack-dev-server/tree/main/examples/api/simple) for an example of how to use webpack-dev-server through the Node.js API.

> **Warning**
>
> You cannot use the second `compiler` argument (a callback) when using `WebpackDevServer`.

> **Warning**
>
> Be aware that when [exporting multiple configurations](/configuration/configuration-types/#exporting-multiple-configurations) only the `devServer` options for the first configuration will be taken into account and used for all the configurations in the array.

> **Note**
>
> If you're having trouble, navigating to the `/webpack-dev-server` route will show where files are served. For example, `http://localhost:9000/webpack-dev-server`.

> **Note**
>
> If you want to manually recompile the bundle, navigating to the `/webpack-dev-server/invalidate` route will [invalidate](/api/node/#invalidate-watching) the current compilation of the bundle and recompile it for you via [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware#invalidate). Depending on your configuration, the URL may look like `http://localhost:9000/webpack-dev-server/invalidate`.

> **Note**
>
> HTML template is required to serve the bundle, usually, it is an `index.html` file. Make sure that script references are added into HTML, webpack-dev-server doesn't inject them automatically.

### Usage via CLI

You can invoke webpack-dev-server via CLI by:

```bash
npx webpack serve
```

A list of CLI options for `serve` is available [here](https://github.com/webpack/webpack-cli/blob/main/SERVE-OPTIONS-v4.md)

### Usage via API

While it's recommended to run `webpack-dev-server` via the CLI, you may also choose to start a server via the API.

See the related [API documentation for `webpack-dev-server`](/api/webpack-dev-server/).

## devServer.allowedHosts

`'auto' | 'all'` `[string]`

This option allows you to allowlist services that are allowed to access the dev server.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    allowedHosts: [
      "host.com",
      "subdomain.host.com",
      "subdomain2.host.com",
      "host2.com",
    ],
  },
};
```

Mimicking Django's `ALLOWED_HOSTS`, a value beginning with `.` can be used as a subdomain wildcard. `.host.com` will match `host.com`, `www.host.com`, and any other subdomain of `host.com`.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    // this achieves the same effect as the first example
    // with the bonus of not having to update your config
    // if new subdomains need to access the dev server
    allowedHosts: [".host.com", "host2.com"],
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --allowed-hosts .host.com --allowed-hosts host2.com
```

When set to `'all'` this option bypasses host checking. **THIS IS NOT RECOMMENDED** as apps that do not check the host are vulnerable to DNS rebinding attacks.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    allowedHosts: "all",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --allowed-hosts all
```

When set to `'auto'` this option always allows `localhost`, [`host`](#devserverhost), and [`client.webSocketURL.hostname`](#websocketurl):

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    allowedHosts: "auto",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --allowed-hosts auto
```

## devServer.bonjour

`boolean = false` `object`

This option broadcasts the server via [ZeroConf](http://www.zeroconf.org/) networking on start.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    bonjour: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --bonjour
```

To disable:

```bash
npx webpack serve --no-bonjour
```

You can also pass [custom options](https://github.com/watson/bonjour#initializing) to bonjour, for example:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    bonjour: {
      type: "http",
      protocol: "udp",
    },
  },
};
```

## devServer.client

### logging

`'log' | 'info' | 'warn' | 'error' | 'none' | 'verbose'`

Allows to set log level in the browser, e.g. before reloading, before an error or when [Hot Module Replacement](/concepts/hot-module-replacement/) is enabled.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      logging: "info",
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-logging info
```

### overlay

`boolean = true` `object`

Shows a full-screen overlay in the browser when there are compiler errors or warnings.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      overlay: true,
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-overlay
```

To disable:

```bash
npx webpack serve --no-client-overlay
```

You can provide an object with the following properties for more granular control:

| Property        | Explanation              |
| --------------- | ------------------------ |
| `errors`        | compilation errors       |
| `runtimeErrors` | unhandled runtime errors |
| `warnings`      | compilation warnings     |

All properties are optional and default to `true` when not provided.

For example, to disable compilation warnings, you can provide the following configuration:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      overlay: {
        errors: true,
        warnings: false,
        runtimeErrors: true,
      },
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-overlay-errors --no-client-overlay-warnings --client-overlay-runtime-errors
```

To filter based on the thrown error, you can pass a function that accepts an `error` parameter and returns a boolean.

For example, to ignore errors thrown by [`AbortController.abort()`](https://developer.mozilla.org/en-US/docs/Web/API/AbortController/abort):

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      overlay: {
        runtimeErrors: (error) => {
          if (error instanceof DOMException && error.name === "AbortError") {
            return false;
          }
          return true;
        },
      },
    },
  },
};
```

> **Warning**
>
> The function will not have access to the variables declared in the outer scope within the configuration file.

### progress

`boolean`

Prints compilation progress in percentage in the browser.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      progress: true,
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-progress
```

To disable:

```bash
npx webpack serve --no-client-progress
```

### reconnect

`boolean = true` `number`

<Badge text="v4.4.0+" />

Tells dev-server the number of times it should try to reconnect the client. When `true` it will try to reconnect unlimited times.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      reconnect: true,
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-reconnect
```

When set to `false` it will not try to reconnect.

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      reconnect: false,
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --no-client-reconnect
```

You can also specify the exact number of times the client should try to reconnect.

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      reconnect: 5,
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-reconnect 5
```

### webSocketTransport

`'ws' | 'sockjs'` `string`

This option allows us either to choose the current `devServer` transport mode for clients individually or to provide custom client implementation. This allows specifying how the browser or other client communicates with the `devServer`.

> **Note**
>
> Providing `'ws'` or `'sockjs'` to [`webSocketServer`](#devserverwebsocketserver) is a shortcut to setting both `devServer.client.webSocketTransport` and `devServer.webSocketServer` to the given value.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketTransport: "ws",
    },
    webSocketServer: "ws",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-web-socket-transport ws --web-socket-server ws
```

> **Note**
>
> When providing a custom client and server implementation make sure that they are compatible with one another to communicate successfully.

To create a custom client implementation, create a class that extends [`BaseClient`](https://github.com/webpack/webpack-dev-server/blob/main/client-src/clients/BaseClient.js).

Using path to `CustomClient.js`, a custom WebSocket client implementation, along with the compatible `'ws'` server:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketTransport: require.resolve("./CustomClient"),
    },
    webSocketServer: "ws",
  },
};
```

Using custom, compatible WebSocket client and server implementations:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketTransport: require.resolve("./CustomClient"),
    },
    webSocketServer: require.resolve("./CustomServer"),
  },
};
```

### webSocketURL

`string` `object`

This option allows specifying URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketURL: "ws://0.0.0.0:8080/ws",
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --client-web-socket-url ws://0.0.0.0:8080/ws
```

You can also specify an object with the following properties:

- `hostname`: Tells clients connected to devServer to use the provided hostname.
- `pathname`: Tells clients connected to devServer to use the provided path to connect.
- `password`: Tells clients connected to devServer to use the provided password to authenticate.
- `port`: Tells clients connected to devServer to use the provided port.
- `protocol`: Tells clients connected to devServer to use the provided protocol.
- `username`: Tells clients connected to devServer to use the provided username to authenticate.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketURL: {
        hostname: "0.0.0.0",
        pathname: "/ws",
        password: "dev-server",
        port: 8080,
        protocol: "ws",
        username: "webpack",
      },
    },
  },
};
```

> **Note**
>
> To get `protocol`/`hostname`/`port` from browser use `webSocketURL: 'auto://0.0.0.0:0/ws'`.

## devServer.compress

`boolean = true`

Enable [gzip compression](https://betterexplained.com/articles/how-to-optimize-your-site-with-gzip-compression/) for everything served:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    compress: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --compress
```

To disable:

```bash
npx webpack serve --no-compress
```

## devServer.devMiddleware

`object`

Provide options to [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) which handles webpack assets.

**webpack.config.js**

```javascript
module.exports = {
  devServer: {
    devMiddleware: {
      index: true,
      mimeTypes: { phtml: "text/html" },
      publicPath: "/publicPathForDevServe",
      serverSideRender: true,
      writeToDisk: true,
    },
  },
};
```

## devServer.http2

`boolean`

Serve over HTTP/2 using [spdy](https://www.npmjs.com/package/spdy). This option is ignored for Node 15.0.0 and above, as spdy is broken for those versions. The dev server will migrate over to Node's built-in HTTP/2 once [Express](https://expressjs.com/) supports it.

HTTP/2 with a self-signed certificate:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    http2: true,
  },
};
```

Usage via CLI

```bash
npx webpack serve --http2
```

To disable:

```bash
npx webpack serve --no-http2
```

Provide your own certificate using the [https](#devserverhttps) option:

**webpack.config.js**

```javascript
const fs = require("node:fs");

module.exports = {
  // ...
  devServer: {
    http2: true,
    https: {
      key: fs.readFileSync("/path/to/server.key"),
      cert: fs.readFileSync("/path/to/server.crt"),
      ca: fs.readFileSync("/path/to/ca.pem"),
    },
  },
};
```

To pass your certificate via CLI, use the following options:

```bash
npx webpack serve --http2 --https-key ./path/to/server.key --https-cert ./path/to/server.crt --https-ca ./path/to/ca.pem
```

> **Warning**
>
> This option is deprecated in favor of the [devServer.server](#devserverserver) option.

## devServer.https

`boolean` `object`

By default, dev-server will be served over `HTTP`. It can optionally be served over `HTTPS`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    https: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --https
```

To disable:

```bash
npx webpack serve --no-https
```

With the above setting, a self-signed certificate is used, but you can provide your own:

**webpack.config.js**

```javascript
module.exports = {
  devServer: {
    https: {
      ca: "./path/to/server.pem",
      pfx: "./path/to/server.pfx",
      key: "./path/to/server.key",
      cert: "./path/to/server.crt",
      passphrase: "webpack-dev-server",
      requestCert: true,
    },
  },
};
```

This object is passed straight to the Node.js HTTPS module, so see the [HTTPS documentation](https://nodejs.org/api/https.html) for more information.

To pass your own certificate via the CLI use the following options:

```bash
npx webpack serve --https-request-cert --https-key ./path/to/server.key --https-cert ./path/to/server.crt --https-ca ./path/to/ca.pem --https-pfx ./path/to/server.pfx --https-passphrase webpack-dev-server
```

`webpack-dev-server >= v4.2.0` allows you to set additional [TLS options](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options) like `minVersion`. Also, you can directly pass the contents of respective files:

**webpack.config.js**

```javascript
const fs = require("node:fs");
const path = require("node:path");

module.exports = {
  devServer: {
    https: {
      minVersion: "TLSv1.1",
      key: fs.readFileSync(path.join(__dirname, "./server.key")),
      pfx: fs.readFileSync(path.join(__dirname, "./server.pfx")),
      cert: fs.readFileSync(path.join(__dirname, "./server.crt")),
      ca: fs.readFileSync(path.join(__dirname, "./ca.pem")),
      passphrase: "webpack-dev-server",
      requestCert: true,
    },
  },
};
```

> **Warning**
>
> Don't specify `https.ca` and `https.cacert` options together, if specified `https.ca` will be used. `https.cacert` is deprecated and will be removed in the next major release.

> **Warning**
>
> This option is deprecated in favor of the [devServer.server](#devserverserver) option.

## devServer.headers

`array` `function` `object`

Adds headers to all responses:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    headers: {
      "X-Custom-Foo": "bar",
    },
  },
};
```

You can also pass an array:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    headers: [
      {
        key: "X-Custom",
        value: "foo",
      },
      {
        key: "Y-Custom",
        value: "bar",
      },
    ],
  },
};
```

You can also pass a function:

```javascript
module.exports = {
  // ...
  devServer: {
    headers: () => ({ "X-Bar": ["key1=value1", "key2=value2"] }),
  },
};
```

## devServer.historyApiFallback

`boolean = false` `object`

When using the [HTML5 History API](https://developer.mozilla.org/en-US/docs/Web/API/History), the `index.html` page will likely have to be served in place of any `404` responses. Enable `devServer.historyApiFallback` by setting it to `true`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    historyApiFallback: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --history-api-fallback
```

To disable:

```bash
npx webpack serve --no-history-api-fallback
```

By providing an object this behavior can be controlled further using options like `rewrites`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    historyApiFallback: {
      rewrites: [
        { from: /^\/$/, to: "/views/landing.html" },
        { from: /^\/subpage/, to: "/views/subpage.html" },
        { from: /./, to: "/views/404.html" },
      ],
    },
  },
};
```

When using dots in your path (common with Angular), you may need to use the `disableDotRule`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    historyApiFallback: {
      disableDotRule: true,
    },
  },
};
```

For more options and information, see the [connect-history-api-fallback](https://github.com/bripkens/connect-history-api-fallback) documentation.

## devServer.host

`'local-ip' | 'local-ipv4' | 'local-ipv6'` `string`

Specify a host to use. If you want your server to be accessible externally, specify it like this:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    host: "0.0.0.0",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --host 0.0.0.0
```

This also works with IPv6:

```bash
npx webpack serve --host ::
```

### local-ip

Specifying `local-ip` as host will try to resolve the host option as your local `IPv4` address if available, if `IPv4` is not available it will try to resolve your local `IPv6` address.

```bash
npx webpack serve --host local-ip
```

### local-ipv4

Specifying `local-ipv4` as host will try to resolve the host option as your local `IPv4` address.

```bash
npx webpack serve --host local-ipv4
```

### local-ipv6

Specifying local-ipv6 as host will try to resolve the host option as your local IPv6 address.

```bash
npx webpack serve --host local-ipv6
```

## devServer.hot

`'only'` `boolean = true`

Enable webpack's [Hot Module Replacement](/concepts/hot-module-replacement/) feature:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    hot: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --hot
```

To disable:

```bash
npx webpack serve --no-hot
```

To enable Hot Module Replacement without page refresh as a fallback in case of build failures, use `hot: 'only'`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    hot: "only",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --hot only
```

> **Note**
>
> Since webpack-dev-server v4, HMR is enabled by default. It automatically applies [`webpack.HotModuleReplacementPlugin`](/plugins/hot-module-replacement-plugin/) which is required to enable HMR. So you don't have to add this plugin to your `webpack.config.js` when `hot` is set to `true` in config or via the CLI option `--hot`. See the [HMR concepts page](/concepts/hot-module-replacement/) for more information.

## devServer.ipc

`true` `string`

The Unix socket to listen to (instead of a [`host`](#devserverhost)).

Setting it to `true` will listen to a socket at `/your-os-temp-dir/webpack-dev-server.sock`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    ipc: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --ipc
```

You can also listen to a different socket with:

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    ipc: path.join(__dirname, "my-socket.sock"),
  },
};
```

## devServer.liveReload

`boolean = true`

By default, the dev-server will reload/refresh the page when file changes are detected. [`devServer.hot`](#devserverhot) option must be disabled or [`devServer.watchFiles`](#devserverwatchfiles) option must be enabled in order for `liveReload` to take effect. Disable `devServer.liveReload` by setting it to `false`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    liveReload: false,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --live-reload
```

To disable:

```bash
npx webpack serve --no-live-reload
```

> **Warning**
>
> Live reloading works only with web related [targets](/configuration/target/#string) like `web`, `webworker`, `electron-renderer` and `node-webkit`.

## devServer.magicHtml

`boolean = true`

<Badge text="v4.1.0+" />

Tell dev-server to enable/disable magic HTML routes (routes corresponding to your webpack output, for example `/main` for `main.js`).

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    magicHtml: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --magic-html
```

To disable:

```bash
npx webpack serve --no-magic-html
```

## devServer.onAfterSetupMiddleware

`function (devServer)`

Provides the ability to execute custom middleware after all other middleware
internally within the server.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    onAfterSetupMiddleware(devServer) {
      if (!devServer) {
        throw new Error("webpack-dev-server is not defined");
      }

      devServer.app.get("/some/path", (req, res) => {
        res.json({ custom: "response" });
      });
    },
  },
};
```

> **Warning**
>
> This option is deprecated in favor of the [devServer.setupMiddlewares](#devserversetupmiddlewares) option.

## devServer.onBeforeSetupMiddleware

`function (devServer)`

Provides the ability to execute custom middleware prior to all other middleware
internally within the server. This could be used to define custom handlers, for
example:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    onBeforeSetupMiddleware(devServer) {
      if (!devServer) {
        throw new Error("webpack-dev-server is not defined");
      }

      devServer.app.get("/some/path", (req, res) => {
        res.json({ custom: "response" });
      });
    },
  },
};
```

> **Warning**
>
> This option is deprecated in favor of the [devServer.setupMiddlewares](#devserversetupmiddlewares) option.

## devserver.onListening

`function (devServer)`

Provides the ability to execute a custom function when webpack-dev-server starts listening for connections on a port.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    onListening(devServer) {
      if (!devServer) {
        throw new Error("webpack-dev-server is not defined");
      }

      const { port } = devServer.server.address();
      console.log("Listening on port:", port);
    },
  },
};
```

## devServer.open

`boolean` `string` `object` `[string, object]`

Tells dev-server to open the browser after server had been started. Set it to `true` to open your default browser.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    open: true,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --open
```

To disable:

```bash
npx webpack serve --no-open
```

To open a specified page in a browser:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    open: ["/my-page"],
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --open /my-page
```

To open multiple specified pages in browser:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    open: ["/my-page", "/another-page"],
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --open /my-page --open /another-page
```

Provide browser name to use instead of the default one:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    open: {
      app: {
        name: "google-chrome",
      },
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --open-app-name 'google-chrome'
```

The object accepts all [open](https://www.npmjs.com/package/open) options:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    open: {
      target: ["first.html", "http://localhost:8080/second.html"],
      app: {
        name: "google-chrome",
        arguments: ["--incognito", "--new-window"],
      },
    },
  },
};
```

> **Note**
>
> The browser application name is platform-dependent. Don't hard code it in reusable modules. For example, `'Chrome'` is `'Google Chrome'` on macOS, `'google-chrome'` on Linux, and `'chrome'` on Windows.

## devServer.port

`'auto'` `string` `number`

Specify a port number to listen for requests on:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    port: 8080,
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --port 8080
```

`port` option can't be `null` or an empty string, to automatically use a free port please use `port: 'auto'`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    port: "auto",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --port auto
```

## devServer.proxy

`object` `[object, function]`

Proxying some URLs can be useful when you have a separate API backend development server and you want to send API requests on the same domain.

The dev-server makes use of the powerful [http-proxy-middleware](https://github.com/chimurai/http-proxy-middleware) package. Check out its [documentation](https://github.com/chimurai/http-proxy-middleware#options) for more advanced usages. Note that some of `http-proxy-middleware`'s features do not require a `target` key, e.g. its `router` feature, but you will still need to include a `target` key in your configuration here, otherwise `webpack-dev-server` won't pass it along to `http-proxy-middleware`.

With a backend on `localhost:3000`, you can use this to enable proxying:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: {
      "/api": "http://localhost:3000",
    },
  },
};
```

A request to `/api/users` will now proxy the request to `http://localhost:3000/api/users`.

If you don't want `/api` to be passed along, we need to rewrite the path:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:3000",
        pathRewrite: { "^/api": "" },
      },
    },
  },
};
```

A backend server running on HTTPS with an invalid certificate will not be accepted by default. If you want to, modify your configuration like this:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: {
      "/api": {
        target: "https://other-server.example.com",
        secure: false,
      },
    },
  },
};
```

Sometimes you don't want to proxy everything. It is possible to bypass the proxy based on the return value of a function.

In the function, you get access to the request, response, and proxy options.

- Return `null` or `undefined` to continue processing the request with proxy.
- Return `false` to produce a 404 error for the request.
- Return a path to serve from, instead of continuing to proxy the request.

E.g. for a browser request, you want to serve an HTML page, but for an API request, you want to proxy it. You could do something like this:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:3000",
        bypass(req, res, proxyOptions) {
          if (req.headers.accept.includes("html")) {
            console.log("Skipping proxy for browser request.");
            return "/index.html";
          }
        },
      },
    },
  },
};
```

If you want to proxy multiple, specific paths to the same target, you can use an array of one or more objects with a `context` property:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: [
      {
        context: ["/auth", "/api"],
        target: "http://localhost:3000",
      },
    ],
  },
};
```

Note that requests to root won't be proxied by default. To enable root proxying, the [`devMiddleware.index`](#devserverdevmiddleware) option should be specified as a falsy value:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    devMiddleware: {
      index: false, // specify to enable root proxying
    },
    proxy: {
      context: () => true,
      target: "http://localhost:1234",
    },
  },
};
```

The origin of the host header is kept when proxying by default, you can set `changeOrigin` to `true` to override this behaviour. It is useful in some cases like using [name-based virtual hosted sites](https://en.wikipedia.org/wiki/Virtual_hosting#Name-based).

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    proxy: {
      "/api": {
        target: "http://localhost:3000",
        changeOrigin: true,
      },
    },
  },
};
```

## devServer.server

`'http' | 'https' | 'spdy'` `string` `object`

<Badge text="v4.4.0+" />

Allows to set server and options (by default 'http').

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    server: "http",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --server-type http
```

To serve over `HTTPS` with a self-signed certificate:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    server: "https",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --server-type https
```

To serve over `HTTP/2` using [spdy](https://www.npmjs.com/package/spdy) with a self-signed certificate:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    server: "spdy",
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --server-type spdy
```

> **Warning**
>
> This option is ignored for Node 15.0.0 and above, as [spdy is broken for those versions](https://github.com/spdy-http2/node-spdy/issues/380). The dev server will migrate over to Node's built-in HTTP/2 once [Express](https://expressjs.com/) supports it.

Use the object syntax to provide your own certificate:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    server: {
      type: "https",
      options: {
        ca: "./path/to/server.pem",
        pfx: "./path/to/server.pfx",
        key: "./path/to/server.key",
        cert: "./path/to/server.crt",
        passphrase: "webpack-dev-server",
        requestCert: true,
      },
    },
  },
};
```

Usage via the CLI:

```bash
npx webpack serve --server-type https --server-options-key ./path/to/server.key --server-options-cert ./path/to/server.crt --server-options-ca ./path/to/ca.pem --server-options-passphrase webpack-dev-server
```

It also allows you to set additional [TLS options](https://nodejs.org/api/tls.html#tls_tls_createsecurecontext_options) like `minVersion` and you can directly pass the contents of respective files:

**webpack.config.js**

```javascript
const fs = require("node:fs");
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    server: {
      type: "https",
      options: {
        minVersion: "TLSv1.1",
        key: fs.readFileSync(path.join(__dirname, "./server.key")),
        pfx: fs.readFileSync(path.join(__dirname, "./server.pfx")),
        cert: fs.readFileSync(path.join(__dirname, "./server.crt")),
        ca: fs.readFileSync(path.join(__dirname, "./ca.pem")),
        passphrase: "webpack-dev-server",
        requestCert: true,
      },
    },
  },
};
```

> **Warning**
>
> Don't specify `server.options.ca` and `server.options.cacert` options together, if specified `server.options.ca` will be used. `server.options.cacert` is deprecated and will be removed in the next major release.

## devServer.setupExitSignals

`boolean = true`

Allows to close dev server and exit the process on `SIGINT` and `SIGTERM` signals.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    setupExitSignals: true,
  },
};
```

## devServer.setupMiddlewares

`function (middlewares, devServer)`

<Badge text="v4.7.0+" />

Provides the ability to execute a custom function and apply custom middleware(s).

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    setupMiddlewares: (middlewares, devServer) => {
      if (!devServer) {
        throw new Error("webpack-dev-server is not defined");
      }

      devServer.app.get("/setup-middleware/some/path", (_, response) => {
        response.send("setup-middlewares option GET");
      });

      // Use the `unshift` method if you want to run a middleware before all other middlewares
      // or when you are migrating from the `onBeforeSetupMiddleware` option
      middlewares.unshift({
        name: "first-in-array",
        // `path` is optional
        path: "/foo/path",
        middleware: (req, res) => {
          res.send("Foo!");
        },
      });

      // Use the `push` method if you want to run a middleware after all other middlewares
      // or when you are migrating from the `onAfterSetupMiddleware` option
      middlewares.push({
        name: "hello-world-test-one",
        // `path` is optional
        path: "/foo/bar",
        middleware: (req, res) => {
          res.send("Foo Bar!");
        },
      });

      middlewares.push((req, res) => {
        res.send("Hello World!");
      });

      return middlewares;
    },
  },
};
```

## devServer.static

`boolean` `string` `object` `[string, object]`

This option allows configuring options for serving static files from the directory (by default 'public' directory). To disable set it to `false`:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    static: false,
  },
};
```

Usage via CLI:

```bash
npx webpack serve --static
```

To disable:

```bash
npx webpack serve --no-static
```

To watch a single directory:

**webpack.config.js**

```js
module.exports = {
  // ...
  devServer: {
    static: ["assets"],
  },
};
```

Usage via CLI:

```bash
npx webpack serve --static assets
```

To watch multiple static directories:

**webpack.config.js**

```js
module.exports = {
  // ...
  devServer: {
    static: ["assets", "css"],
  },
};
```

Usage via CLI:

```bash
npx webpack serve --static assets --static css
```

### directory

`string = path.join(process.cwd(), 'public')`

Tell the server where to serve the content from. This is only necessary if you want to serve static files. [`static.publicPath`](#publicpath) will be used to determine where the bundles should be served from and takes precedence.

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "public"),
    },
  },
};
```

Provide an array of objects in case you have multiple static folders:

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: [
      {
        directory: path.join(__dirname, "assets"),
      },
      {
        directory: path.join(__dirname, "css"),
      },
    ],
  },
};
```

> **Note**
>
> It is recommended to use an absolute path.

### staticOptions

`object`

It is possible to configure advanced options for serving static files from [`static.directory`](#directory). See the [Express documentation](http://expressjs.com/en/4x/api.html#express.static) for the possible options.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    static: {
      staticOptions: {
        redirect: true,
      },
    },
  },
};
```

### publicPath

`string = '/'` `[string]`

Tell the server at which URL to serve [`static.directory`](#directory) content. For example to serve a file `assets/manifest.json` at `/serve-public-path-url/manifest.json`, your configurations should be as following:

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "assets"),
      publicPath: "/serve-public-path-url",
    },
  },
};
```

Provide an array of objects in case you have multiple static folders:

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: [
      {
        directory: path.join(__dirname, "assets"),
        publicPath: "/serve-public-path-url",
      },
      {
        directory: path.join(__dirname, "css"),
        publicPath: "/other-serve-public-path-url",
      },
    ],
  },
};
```

### serveIndex

`boolean` `object = { icons: true }`

Tell dev-server to use [`serveIndex`](https://github.com/expressjs/serve-index) middleware when enabled.

[`serveIndex`](https://github.com/expressjs/serve-index) middleware generates directory listings on viewing directories that don't have an `index.html` file.

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "public"),
      serveIndex: true,
    },
  },
};
```

Usage via CLI:

```bash
npx webpack serve --static-serve-index
```

To disable:

```bash
npx webpack serve --no-static-serve-index
```

### watch

`boolean` `object`

Tell dev-server to watch the files served by the [`static.directory`](#directory) option. It is enabled by default, and file changes will trigger a full page reload. This can be disabled by setting the `watch` option to `false`.

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "public"),
      watch: false,
    },
  },
};
```

Usage via CLI:

```bash
npx webpack serve --static-watch
```

To disable:

```bash
npx webpack serve --no-static-watch
```

It is possible to configure advanced options for watching static files from [`static.directory`](#directory). See the [`chokidar`](https://github.com/paulmillr/chokidar) documentation for the possible options.

**webpack.config.js**

```javascript
const path = require("node:path");

module.exports = {
  // ...
  devServer: {
    static: {
      directory: path.join(__dirname, "public"),
      watch: {
        ignored: "*.txt",
        usePolling: false,
      },
    },
  },
};
```

## devServer.watchFiles

`string` `object` `[string, object]`

This option allows you to configure a list of globs/directories/files to watch for file changes. For example:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    watchFiles: ["src/**/*.php", "public/**/*"],
  },
};
```

It is possible to configure advanced options for watching files. See the [`chokidar`](https://github.com/paulmillr/chokidar) documentation for the possible options.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    watchFiles: {
      paths: ["src/**/*.php", "public/**/*"],
      options: {
        usePolling: false,
      },
    },
  },
};
```

## devServer.webSocketServer

`false | 'sockjs' | 'ws'` `string` `function` `object`

This option allows us either to choose the current web-socket server or to provide custom web-socket server implementation.

The current default mode is `'ws'`. This mode uses [`ws`](https://www.npmjs.com/package/ws) as a server, and native WebSockets on the client.

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    webSocketServer: "ws",
  },
};
```

To create a custom server implementation, create a class that extends [`BaseServer`](https://github.com/webpack/webpack-dev-server/blob/main/lib/servers/BaseServer.js).

Using path to `CustomServer.js`, a custom WebSocket server implementation, along with the compatible `'ws'` client:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketTransport: "ws",
    },
    webSocketServer: require.resolve("./CustomServer"),
  },
};
```

Using custom, compatible WebSocket client and server implementations:

**webpack.config.js**

```javascript
module.exports = {
  // ...
  devServer: {
    client: {
      webSocketTransport: require.resolve("./CustomClient"),
    },
    webSocketServer: require.resolve("./CustomServer"),
  },
};
```


================================================
FILE: LICENSE
================================================
Copyright JS Foundation and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.


================================================
FILE: README.md
================================================
<div align="center">
  <a href="https://github.com/webpack/webpack">
    <img width="200" height="200" src="https://webpack.js.org/assets/icon-square-big.svg">
  </a>
</div>

[![npm][npm]][npm-url]
[![node][node]][node-url]
[![tests][tests]][tests-url]
[![coverage][cover]][cover-url]
[![discussion][discussion]][discussion-url]
[![downloads][downloads]][npm-url]
[![contributors][contributors]][contributors-url]

# webpack-dev-server

Use [webpack](https://webpack.js.org) with a development server that provides
live reloading. This should be used for **development only**.

It uses [webpack-dev-middleware][middleware-url] under the hood, which provides
fast in-memory access to the webpack assets.

## Table of Contents

- [Getting Started](#getting-started)
- [Usage](#usage)
  - [With the CLI](#with-the-cli)
  - [With NPM Scripts](#with-npm-scripts)
  - [With the API](#with-the-api)
  - [With TypeScript](#with-typescript)
  - [The Result](#the-result)
- [Browser Support](#browser-support)
- [Support](#support)
- [Contributing](#contributing)
- [Attribution](#attribution)
- [License](#license)

## Getting Started

First things first, install the module:

```console
npm install webpack-dev-server --save-dev
```

or

```console
yarn add -D webpack-dev-server
```

or

```console
pnpm add -D webpack-dev-server
```

_Note: While you can install and run webpack-dev-server globally, we recommend
installing it locally. webpack-dev-server will always use a local installation
over a global one._

## Usage

There are two main, recommended methods of using the module:

### With the CLI

The easiest way to use it is with the [webpack CLI](https://webpack.js.org/api/cli/). In the directory where your
`webpack.config.js` is, run:

```console
npx webpack serve
```

Following options are available with `webpack serve`:

```
Usage: webpack serve|server|s [entries...] [options]

Run the webpack dev server.

Options:
  -c, --config <value...>                             Provide path to a webpack configuration file e.g. ./webpack.config.js.
  --config-name <value...>                            Name of the configuration to use.
  -m, --merge                                         Merge two or more configurations using 'webpack-merge'.
  --disable-interpret                                 Disable interpret for loading the config file.
  --env <value...>                                    Environment passed to the configuration when it is a function.
  --node-env <value>                                  Sets process.env.NODE_ENV to the specified value.
  --define-process-env-node-env <value>               Sets process.env.NODE_ENV to the specified value. (Currently an alias for `--node-env`)
  --analyze                                           It invokes webpack-bundle-analyzer plugin to get bundle information.
  --progress [value]                                  Print compilation progress during build.
  -j, --json [value]                                  Prints result as JSON or store it in a file.
  --fail-on-warnings                                  Stop webpack-cli process with non-zero exit code on warnings from webpack
  -d, --devtool <value>                               A developer tool to enhance debugging (false | eval | [inline-|hidden-|eval-][nosources-][cheap-[module-]]source-map).
  --no-devtool                                        Negative 'devtool' option.
  --entry <value...>                                  A module that is loaded upon startup. Only the last one is exported.
  --mode <value>                                      Enable production optimizations or development hints.
  --name <value>                                      Name of the configuration. Used when loading multiple configurations.
  -o, --output-path <value>                           The output directory as **absolute path** (required).
  --stats [value]                                     Stats options object or preset name.
  --no-stats                                          Negative 'stats' option.
  -t, --target <value...>                             Environment to build for. Environment to build for. An array of environments to build for all of them when possible.
  --no-target                                         Negative 'target' option.
  --watch-options-stdin                               Stop watching when stdin stream has ended.
  --no-watch-options-stdin                            Negative 'watch-options-stdin' option.
  --allowed-hosts <value...>                          Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').
  --allowed-hosts-reset                               Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').
  --bonjour                                           Allows to broadcasts dev server via ZeroConf networking on start.
  --no-bonjour                                        Disallows to broadcasts dev server via ZeroConf networking on start.
  --no-client                                         Disables client script.
  --client-logging <value>                            Allows to set log level in the browser.
  --client-overlay                                    Enables a full-screen overlay in the browser when there are compiler errors or warnings.
  --no-client-overlay                                 Disables the full-screen overlay in the browser when there are compiler errors or warnings.
  --client-overlay-errors                             Enables a full-screen overlay in the browser when there are compiler errors.
  --no-client-overlay-errors                          Disables the full-screen overlay in the browser when there are compiler errors.
  --client-overlay-warnings                           Enables a full-screen overlay in the browser when there are compiler warnings.
  --no-client-overlay-warnings                        Disables the full-screen overlay in the browser when there are compiler warnings.
  --client-overlay-runtime-errors                     Enables a full-screen overlay in the browser when there are uncaught runtime errors.
  --no-client-overlay-runtime-errors                  Disables the full-screen overlay in the browser when there are uncaught runtime errors.
  --client-overlay-trusted-types-policy-name <value>  The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.
  --client-progress                                   Prints compilation progress in percentage in the browser.
  --no-client-progress                                Does not print compilation progress in percentage in the browser.
  --client-reconnect [value]                          Tells dev-server the number of times it should try to reconnect the client.
  --no-client-reconnect                               Tells dev-server to not to try to reconnect the client.
  --client-web-socket-transport <value>               Allows to set custom web socket transport to communicate with dev server.
  --client-web-socket-url <value>                     Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).
  --client-web-socket-url-hostname <value>            Tells clients connected to devServer to use the provided hostname.
  --client-web-socket-url-pathname <value>            Tells clients connected to devServer to use the provided path to connect.
  --client-web-socket-url-password <value>            Tells clients connected to devServer to use the provided password to authenticate.
  --client-web-socket-url-port <value>                Tells clients connected to devServer to use the provided port.
  --client-web-socket-url-protocol <value>            Tells clients connected to devServer to use the provided protocol.
  --client-web-socket-url-username <value>            Tells clients connected to devServer to use the provided username to authenticate.
  --compress                                          Enables gzip compression for everything served.
  --no-compress                                       Disables gzip compression for everything served.
  --history-api-fallback                              Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.
  --no-history-api-fallback                           Disallows to proxy requests through a specified index page.
  --host <value>                                      Allows to specify a hostname to use.
  --hot [value]                                       Enables Hot Module Replacement.
  --no-hot                                            Disables Hot Module Replacement.
  --ipc [value]                                       Listen to a unix socket.
  --live-reload                                       Enables reload/refresh the page(s) when file changes are detected (enabled by default).
  --no-live-reload                                    Disables reload/refresh the page(s) when file changes are detected (enabled by default).
  --open [value...]                                   Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).
  --no-open                                           Does not open the default browser.
  --open-target <value...>                            Opens specified page in browser.
  --open-app-name <value...>                          Open specified browser.
  --open-reset                                        Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).
  --open-target-reset                                 Clear all items provided in 'open.target' configuration. Opens specified page in browser.
  --open-app-name-reset                               Clear all items provided in 'open.app.name' configuration. Open specified browser.
  --port <value>                                      Allows to specify a port to use.
  --server-type <value>                               Allows to set server and options (by default 'http').
  --server-options-passphrase <value>                 Passphrase for a pfx file.
  --server-options-request-cert                       Request for an SSL certificate.
  --no-server-options-request-cert                    Does not request for an SSL certificate.
  --server-options-ca <value...>                      Path to an SSL CA certificate or content of an SSL CA certificate.
  --server-options-ca-reset                           Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.
  --server-options-cert <value...>                    Path to an SSL certificate or content of an SSL certificate.
  --server-options-cert-reset                         Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.
  --server-options-crl <value...>                     Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
  --server-options-crl-reset                          Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).
  --server-options-key <value...>                     Path to an SSL key or content of an SSL key.
  --server-options-key-reset                          Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.
  --server-options-pfx <value...>                     Path to an SSL pfx file or content of an SSL pfx file.
  --server-options-pfx-reset                          Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.
  --static [value...]                                 Allows to configure options for serving static files from directory (by default 'public' directory).
  --no-static                                         Disallows to configure options for serving static files from directory.
  --static-directory <value...>                       Directory for static contents.
  --static-public-path <value...>                     The static files will be available in the browser under this public path.
  --static-serve-index                                Tells dev server to use serveIndex middleware when enabled.
  --no-static-serve-index                             Does not tell dev server to use serveIndex middleware.
  --static-watch                                      Watches for files in static content directory.
  --no-static-watch                                   Does not watch for files in static content directory.
  --static-reset                                      Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).
  --static-public-path-reset                          Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.
  --watch-files <value...>                            Allows to configure list of globs/directories/files to watch for file changes.
  --watch-files-reset                                 Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.
  --no-web-socket-server                              Disallows to set web socket server and options.
  --web-socket-server-type <value>                    Allows to set web socket server and options (by default 'ws').

Global options:
  --color                                             Enable colors on console.
  --no-color                                          Disable colors on console.
  -v, --version                                       Output the version number of 'webpack', 'webpack-cli' and 'webpack-dev-server' and commands.
  -h, --help [verbose]                                Display help for commands and options.

To see list of all supported commands and options run 'webpack --help=verbose'.

Webpack documentation: https://webpack.js.org/.
CLI documentation: https://webpack.js.org/api/cli/.
Made with ♥ by the webpack team.
```

> [!NOTE]
>
> _Detailed documentation for above options is available on this [link](https://webpack.js.org/configuration/dev-server/)._

### With NPM Scripts

NPM package.json scripts are a convenient and useful means to run locally installed
binaries without having to be concerned about their full paths. Simply define a
script as such:

```json
{
  "scripts": {
    "serve": "webpack serve"
  }
}
```

And run the following in your terminal/console:

```console
npm run serve
```

NPM will automatically refer to the the binary in `node_modules` for you, and
execute the file or command.

### With the API

While it's recommended to run webpack-dev-server via the CLI, you may also choose to start a server via the API.

See the related [API documentation for `webpack-dev-server`](https://webpack.js.org/api/webpack-dev-server/).

### With TypeScript

If you use TypeScript in the webpack config, you'll need to properly type `devServer` property in order to avoid TS errors (e.g. `'devServer' does not exist in type 'Configuration'`). For that use either:

```ts
/// <reference path="node_modules/webpack-dev-server/types/lib/Server.d.ts"/>
import { type Configuration } from "webpack";

// Your logic
```

Or you can import the type from `webpack-dev-server`, i.e.

```ts
import { type Configuration } from "webpack";
import { type Configuration as DevServerConfiguration } from "webpack-dev-server";

const devServer: DevServerConfiguration = {};
const config: Configuration = { devServer };

// module.exports
export default config;
```

### The Result

Either method will start a server instance and begin listening for connections
from `localhost` on port `8080`.

webpack-dev-server is configured by default to support live-reload of files as
you edit your assets while the server is running.

See [**the documentation**][docs-url] for more use cases and options.

## Browser Support

While `webpack-dev-server` transpiles the client (browser) scripts to an ES5
state, the project only officially supports the _last two versions of major
browsers_. We simply don't have the resources to support every whacky
browser out there.

If you find a bug with an obscure / old browser, we would actively welcome a
Pull Request to resolve the bug.

## Support

We do our best to keep issues in the repository focused on bugs, features, and
needed modifications to the code for the module. Because of that, we ask users
with general support, "how-to", or "why isn't this working" questions to try one
of the other support channels that are available.

Your first-stop-shop for support for webpack-dev-server should be the excellent
[documentation][docs-url] for the module. If you see an opportunity for improvement
of those docs, please head over to the [webpack.js.org repo][wjo-url] and open a
pull request.

From there, we encourage users to visit the [webpack discussions][discussion-url] and
talk to the fine folks there. If your quest for answers comes up dry in chat,
head over to [StackOverflow][stack-url] and do a quick search or open a new
question. Remember; It's always much easier to answer questions that include your
`webpack.config.js` and relevant files!

If you're twitter-savvy you can tweet [#webpack][hash-url] with your question
and someone should be able to reach out and lend a hand.

If you have discovered a :bug:, have a feature suggestion, or would like to see
a modification, please feel free to create an issue on Github. _Note: The issue
template isn't optional, so please be sure not to remove it, and please fill it
out completely._

## Contributing

We welcome your contributions! Please have a read of [CONTRIBUTING.md](CONTRIBUTING.md) for more information on how to get involved.

## Attribution

This project is heavily inspired by [peerigon/nof5](https://github.com/peerigon/nof5).

## License

#### [MIT](./LICENSE)

[npm]: https://img.shields.io/npm/v/webpack-dev-server.svg
[npm-url]: https://npmjs.com/package/webpack-dev-server
[node]: https://img.shields.io/node/v/webpack-dev-server.svg
[node-url]: https://nodejs.org
[tests]: https://github.com/webpack/webpack-dev-server/workflows/webpack-dev-server/badge.svg
[tests-url]: https://github.com/webpack/webpack-dev-server/actions?query=workflow%3Awebpack-dev-server
[cover]: https://codecov.io/gh/webpack/webpack-dev-server/graph/badge.svg
[cover-url]: https://codecov.io/gh/webpack/webpack-dev-server
[discussion]: https://img.shields.io/github/discussions/webpack/webpack
[discussion-url]: https://github.com/webpack/webpack/discussions
[docs-url]: https://webpack.js.org/configuration/dev-server/#devserver
[hash-url]: https://twitter.com/search?q=webpack
[middleware-url]: https://github.com/webpack/webpack-dev-middleware
[stack-url]: https://stackoverflow.com/questions/tagged/webpack-dev-server
[uglify-url]: https://github.com/webpack-contrib/uglifyjs-webpack-plugin
[wjo-url]: https://github.com/webpack/webpack.js.org
[downloads]: https://img.shields.io/npm/dm/webpack-dev-server.svg
[contributors-url]: https://github.com/webpack/webpack-dev-server/graphs/contributors
[contributors]: https://img.shields.io/github/contributors/webpack/webpack-dev-server.svg


================================================
FILE: babel.config.js
================================================
"use strict";

module.exports = (api) => {
  api.cache(true);

  return {
    presets: [
      [
        "@babel/preset-env",
        {
          modules: false,
          targets: {
            esmodules: true,
            node: "0.12",
          },
        },
      ],
    ],
    plugins: ["@babel/plugin-transform-object-assign"],
    env: {
      test: {
        presets: [
          [
            "@babel/preset-env",
            {
              targets: {
                node: "18.12.0",
              },
            },
          ],
        ],
        plugins: ["@babel/plugin-transform-runtime"],
      },
    },
  };
};


================================================
FILE: bin/cli-flags.js
================================================
"use strict";

module.exports = {
  "allowed-hosts": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
        path: "allowedHosts[]",
      },
      {
        description:
          "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
        multiple: false,
        path: "allowedHosts",
        type: "enum",
        values: ["auto", "all"],
      },
    ],
    description:
      "Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
    multiple: true,
    simpleType: "string",
  },
  "allowed-hosts-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
        path: "allowedHosts",
      },
    ],
    description:
      "Clear all items provided in 'allowedHosts' configuration. Allows to enumerate the hosts from which access to the dev server are allowed (useful when you are proxying dev server, by default is 'auto').",
    simpleType: "boolean",
    multiple: false,
  },
  bonjour: {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to broadcasts dev server via ZeroConf networking on start.",
        negatedDescription:
          "Disallows to broadcasts dev server via ZeroConf networking on start.",
        path: "bonjour",
      },
    ],
    description:
      "Allows to broadcasts dev server via ZeroConf networking on start.",
    simpleType: "boolean",
    multiple: false,
  },
  client: {
    configs: [
      {
        description:
          "Allows to specify options for client script in the browser or disable client script.",
        negatedDescription: "Disables client script.",
        multiple: false,
        path: "client",
        type: "enum",
        values: [false],
      },
    ],
    description:
      "Allows to specify options for client script in the browser or disable client script.",
    multiple: false,
    simpleType: "boolean",
  },
  "client-logging": {
    configs: [
      {
        type: "enum",
        values: ["none", "error", "warn", "info", "log", "verbose"],
        multiple: false,
        description: "Allows to set log level in the browser.",
        path: "client.logging",
      },
    ],
    description: "Allows to set log level in the browser.",
    simpleType: "string",
    multiple: false,
  },
  "client-overlay": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
        negatedDescription:
          "Disables the full-screen overlay in the browser when there are compiler errors or warnings.",
        path: "client.overlay",
      },
    ],
    description:
      "Enables a full-screen overlay in the browser when there are compiler errors or warnings.",
    simpleType: "boolean",
    multiple: false,
  },
  "client-overlay-errors": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Enables a full-screen overlay in the browser when there are compiler errors.",
        negatedDescription:
          "Disables the full-screen overlay in the browser when there are compiler errors.",
        path: "client.overlay.errors",
      },
    ],
    description:
      "Enables a full-screen overlay in the browser when there are compiler errors.",
    simpleType: "boolean",
    multiple: false,
  },
  "client-overlay-trusted-types-policy-name": {
    configs: [
      {
        description:
          "The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.",
        multiple: false,
        path: "client.overlay.trustedTypesPolicyName",
        type: "string",
      },
    ],
    description:
      "The name of a Trusted Types policy for the overlay. Defaults to 'webpack-dev-server#overlay'.",
    multiple: false,
    simpleType: "string",
  },
  "client-overlay-warnings": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Enables a full-screen overlay in the browser when there are compiler warnings.",
        negatedDescription:
          "Disables the full-screen overlay in the browser when there are compiler warnings.",
        path: "client.overlay.warnings",
      },
    ],
    description:
      "Enables a full-screen overlay in the browser when there are compiler warnings.",
    simpleType: "boolean",
    multiple: false,
  },
  "client-overlay-runtime-errors": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Enables a full-screen overlay in the browser when there are uncaught runtime errors.",
        negatedDescription:
          "Disables the full-screen overlay in the browser when there are uncaught runtime errors.",
        path: "client.overlay.runtimeErrors",
      },
    ],
    description:
      "Enables a full-screen overlay in the browser when there are uncaught runtime errors.",
    simpleType: "boolean",
    multiple: false,
  },
  "client-progress": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Prints compilation progress in percentage in the browser.",
        negatedDescription:
          "Does not print compilation progress in percentage in the browser.",
        path: "client.progress",
      },
    ],
    description: "Prints compilation progress in percentage in the browser.",
    simpleType: "boolean",
    multiple: false,
  },
  "client-reconnect": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Tells dev-server the number of times it should try to reconnect the client.",
        negatedDescription:
          "Tells dev-server to not to try to reconnect the client.",
        path: "client.reconnect",
      },
      {
        type: "number",
        multiple: false,
        description:
          "Tells dev-server the number of times it should try to reconnect the client.",
        path: "client.reconnect",
      },
    ],
    description:
      "Tells dev-server the number of times it should try to reconnect the client.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-transport": {
    configs: [
      {
        type: "enum",
        values: ["sockjs", "ws"],
        multiple: false,
        description:
          "Allows to set custom web socket transport to communicate with dev server.",
        path: "client.webSocketTransport",
      },
      {
        type: "string",
        multiple: false,
        description:
          "Allows to set custom web socket transport to communicate with dev server.",
        path: "client.webSocketTransport",
      },
    ],
    description:
      "Allows to set custom web socket transport to communicate with dev server.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).",
        path: "client.webSocketURL",
      },
    ],
    description:
      "Allows to specify URL to web socket server (useful when you're proxying dev server and client script does not always know where to connect to).",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url-hostname": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Tells clients connected to devServer to use the provided hostname.",
        path: "client.webSocketURL.hostname",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided hostname.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url-password": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Tells clients connected to devServer to use the provided password to authenticate.",
        path: "client.webSocketURL.password",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided password to authenticate.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url-pathname": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Tells clients connected to devServer to use the provided path to connect.",
        path: "client.webSocketURL.pathname",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided path to connect.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url-port": {
    configs: [
      {
        type: "number",
        multiple: false,
        description:
          "Tells clients connected to devServer to use the provided port.",
        path: "client.webSocketURL.port",
      },
      {
        description:
          "Tells clients connected to devServer to use the provided port.",
        multiple: false,
        path: "client.webSocketURL.port",
        type: "string",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided port.",
    simpleType: "string",
    multiple: false,
  },
  "client-web-socket-url-protocol": {
    configs: [
      {
        description:
          "Tells clients connected to devServer to use the provided protocol.",
        multiple: false,
        path: "client.webSocketURL.protocol",
        type: "enum",
        values: ["auto"],
      },
      {
        description:
          "Tells clients connected to devServer to use the provided protocol.",
        multiple: false,
        path: "client.webSocketURL.protocol",
        type: "string",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided protocol.",
    multiple: false,
    simpleType: "string",
  },
  "client-web-socket-url-username": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Tells clients connected to devServer to use the provided username to authenticate.",
        path: "client.webSocketURL.username",
      },
    ],
    description:
      "Tells clients connected to devServer to use the provided username to authenticate.",
    simpleType: "string",
    multiple: false,
  },
  compress: {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description: "Enables gzip compression for everything served.",
        negatedDescription: "Disables gzip compression for everything served.",
        path: "compress",
      },
    ],
    description: "Enables gzip compression for everything served.",
    simpleType: "boolean",
    multiple: false,
  },
  "history-api-fallback": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.",
        negatedDescription:
          "Disallows to proxy requests through a specified index page.",
        path: "historyApiFallback",
      },
    ],
    description:
      "Allows to proxy requests through a specified index page (by default 'index.html'), useful for Single Page Applications that utilise the HTML5 History API.",
    simpleType: "boolean",
    multiple: false,
  },
  host: {
    configs: [
      {
        description: "Allows to specify a hostname to use.",
        multiple: false,
        path: "host",
        type: "enum",
        values: ["local-ip", "local-ipv4", "local-ipv6"],
      },
      {
        description: "Allows to specify a hostname to use.",
        multiple: false,
        path: "host",
        type: "string",
      },
    ],
    description: "Allows to specify a hostname to use.",
    simpleType: "string",
    multiple: false,
  },
  hot: {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description: "Enables Hot Module Replacement.",
        negatedDescription: "Disables Hot Module Replacement.",
        path: "hot",
      },
      {
        type: "enum",
        values: ["only"],
        multiple: false,
        description: "Enables Hot Module Replacement.",
        path: "hot",
      },
    ],
    description: "Enables Hot Module Replacement.",
    simpleType: "string",
    multiple: false,
  },
  http2: {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
        negatedDescription: "Does not serve over HTTP/2 using SPDY.",
        path: "http2",
      },
    ],
    description:
      "Allows to serve over HTTP/2 using SPDY. Deprecated, use the `server` option.",
    simpleType: "boolean",
    multiple: false,
  },
  https: {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
        negatedDescription:
          "Disallows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP).",
        path: "https",
      },
    ],
    description:
      "Allows to configure the server's listening socket for TLS (by default, dev server will be served over HTTP). Deprecated, use the `server` option.",
    simpleType: "boolean",
    multiple: false,
  },
  "https-ca": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        path: "https.ca[]",
      },
    ],
    description:
      "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    simpleType: "string",
    multiple: true,
  },
  "https-ca-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        multiple: false,
        path: "https.ca",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-cacert": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        path: "https.cacert[]",
      },
    ],
    description:
      "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    simpleType: "string",
    multiple: true,
  },
  "https-cacert-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        multiple: false,
        path: "https.cacert",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-cert": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
        path: "https.cert[]",
      },
    ],
    description:
      "Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
    simpleType: "string",
    multiple: true,
  },
  "https-cert-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
        multiple: false,
        path: "https.cert",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.cert' configuration. Path to an SSL certificate or content of an SSL certificate. Deprecated, use the `server.options.cert` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-crl": {
    configs: [
      {
        description:
          "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
        multiple: true,
        path: "https.crl[]",
        type: "string",
      },
    ],
    description:
      "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
    multiple: true,
    simpleType: "string",
  },
  "https-crl-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
        multiple: false,
        path: "https.crl",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists). Deprecated, use the `server.options.crl` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-key": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
        path: "https.key[]",
      },
    ],
    description:
      "Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
    simpleType: "string",
    multiple: true,
  },
  "https-key-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
        multiple: false,
        path: "https.key",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.key' configuration. Path to an SSL key or content of an SSL key. Deprecated, use the `server.options.key` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-passphrase": {
    configs: [
      {
        type: "string",
        multiple: false,
        description:
          "Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.",
        path: "https.passphrase",
      },
    ],
    description:
      "Passphrase for a pfx file. Deprecated, use the `server.options.passphrase` option.",
    simpleType: "string",
    multiple: false,
  },
  "https-pfx": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
        path: "https.pfx[]",
      },
    ],
    description:
      "Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
    simpleType: "string",
    multiple: true,
  },
  "https-pfx-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
        multiple: false,
        path: "https.pfx",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'https.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file. Deprecated, use the `server.options.pfx` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "https-request-cert": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
        negatedDescription: "Does not request for an SSL certificate.",
        path: "https.requestCert",
      },
    ],
    description:
      "Request for an SSL certificate. Deprecated, use the `server.options.requestCert` option.",
    simpleType: "boolean",
    multiple: false,
  },
  ipc: {
    configs: [
      {
        type: "string",
        multiple: false,
        description: "Listen to a unix socket.",
        path: "ipc",
      },
      {
        type: "enum",
        values: [true],
        multiple: false,
        description: "Listen to a unix socket.",
        path: "ipc",
      },
    ],
    description: "Listen to a unix socket.",
    simpleType: "string",
    multiple: false,
  },
  "live-reload": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Enables reload/refresh the page(s) when file changes are detected (enabled by default).",
        negatedDescription:
          "Disables reload/refresh the page(s) when file changes are detected (enabled by default).",
        path: "liveReload",
      },
    ],
    description:
      "Enables reload/refresh the page(s) when file changes are detected (enabled by default).",
    simpleType: "boolean",
    multiple: false,
  },
  "magic-html": {
    configs: [
      {
        type: "boolean",
        multiple: false,
        description:
          "Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
        negatedDescription:
          "Disables magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
        path: "magicHtml",
      },
    ],
    description:
      "Tells dev-server whether to enable magic HTML routes (routes corresponding to your webpack output, for example '/main' for 'main.js').",
    simpleType: "boolean",
    multiple: false,
  },
  open: {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
        path: "open[]",
      },
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
        negatedDescription: "Does not open the default browser.",
        path: "open",
      },
    ],
    description:
      "Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
    simpleType: "string",
    multiple: true,
  },
  "open-app": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Open specified browser. Deprecated: please use '--open-app-name'.",
        path: "open[].app",
      },
    ],
    description:
      "Open specified browser. Deprecated: please use '--open-app-name'.",
    simpleType: "string",
    multiple: true,
  },
  "open-app-name": {
    configs: [
      {
        type: "string",
        multiple: true,
        description: "Open specified browser.",
        path: "open[].app.name",
      },
      {
        type: "string",
        multiple: true,
        description: "Open specified browser.",
        path: "open.app.name[]",
      },
    ],
    description: "Open specified browser.",
    simpleType: "string",
    multiple: true,
  },
  "open-app-name-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'open.app.name' configuration. Open specified browser.",
        path: "open.app.name",
      },
    ],
    description:
      "Clear all items provided in 'open.app.name' configuration. Open specified browser.",
    simpleType: "boolean",
    multiple: false,
  },
  "open-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
        path: "open",
      },
    ],
    description:
      "Clear all items provided in 'open' configuration. Allows to configure dev server to open the browser(s) and page(s) after server had been started (set it to true to open your default browser).",
    simpleType: "boolean",
    multiple: false,
  },
  "open-target": {
    configs: [
      {
        type: "string",
        multiple: true,
        description: "Opens specified page in browser.",
        path: "open[].target",
      },
      {
        type: "string",
        multiple: true,
        description: "Opens specified page in browser.",
        path: "open.target[]",
      },
    ],
    description: "Opens specified page in browser.",
    simpleType: "string",
    multiple: true,
  },
  "open-target-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'open.target' configuration. Opens specified page in browser.",
        path: "open.target",
      },
    ],
    description:
      "Clear all items provided in 'open.target' configuration. Opens specified page in browser.",
    simpleType: "boolean",
    multiple: false,
  },
  port: {
    configs: [
      {
        type: "number",
        multiple: false,
        description: "Allows to specify a port to use.",
        path: "port",
      },
      {
        type: "string",
        multiple: false,
        description: "Allows to specify a port to use.",
        path: "port",
      },
      {
        type: "enum",
        values: ["auto"],
        multiple: false,
        description: "Allows to specify a port to use.",
        path: "port",
      },
    ],
    description: "Allows to specify a port to use.",
    simpleType: "string",
    multiple: false,
  },
  "server-options-ca": {
    configs: [
      {
        description:
          "Path to an SSL CA certificate or content of an SSL CA certificate.",
        multiple: true,
        path: "server.options.ca[]",
        type: "string",
      },
    ],
    description:
      "Path to an SSL CA certificate or content of an SSL CA certificate.",
    multiple: true,
    simpleType: "string",
  },
  "server-options-ca-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
        multiple: false,
        path: "server.options.ca",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.ca' configuration. Path to an SSL CA certificate or content of an SSL CA certificate.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-cacert": {
    configs: [
      {
        description:
          "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        multiple: true,
        path: "server.options.cacert[]",
        type: "string",
      },
    ],
    description:
      "Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    multiple: true,
    simpleType: "string",
  },
  "server-options-cacert-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
        multiple: false,
        path: "server.options.cacert",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.cacert' configuration. Path to an SSL CA certificate or content of an SSL CA certificate. Deprecated, use the `server.options.ca` option.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-cert": {
    configs: [
      {
        description:
          "Path to an SSL certificate or content of an SSL certificate.",
        multiple: true,
        path: "server.options.cert[]",
        type: "string",
      },
    ],
    description: "Path to an SSL certificate or content of an SSL certificate.",
    multiple: true,
    simpleType: "string",
  },
  "server-options-cert-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
        multiple: false,
        path: "server.options.cert",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.cert' configuration. Path to an SSL certificate or content of an SSL certificate.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-crl": {
    configs: [
      {
        description:
          "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
        multiple: true,
        path: "server.options.crl[]",
        type: "string",
      },
    ],
    description:
      "Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
    multiple: true,
    simpleType: "string",
  },
  "server-options-crl-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
        multiple: false,
        path: "server.options.crl",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.crl' configuration. Path to PEM formatted CRLs (Certificate Revocation Lists) or content of PEM formatted CRLs (Certificate Revocation Lists).",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-key": {
    configs: [
      {
        description: "Path to an SSL key or content of an SSL key.",
        multiple: true,
        path: "server.options.key[]",
        type: "string",
      },
    ],
    description: "Path to an SSL key or content of an SSL key.",
    multiple: true,
    simpleType: "string",
  },
  "server-options-key-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.",
        multiple: false,
        path: "server.options.key",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.key' configuration. Path to an SSL key or content of an SSL key.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-passphrase": {
    configs: [
      {
        description: "Passphrase for a pfx file.",
        multiple: false,
        path: "server.options.passphrase",
        type: "string",
      },
    ],
    description: "Passphrase for a pfx file.",
    multiple: false,
    simpleType: "string",
  },
  "server-options-pfx": {
    configs: [
      {
        description: "Path to an SSL pfx file or content of an SSL pfx file.",
        multiple: true,
        path: "server.options.pfx[]",
        type: "string",
      },
    ],
    description: "Path to an SSL pfx file or content of an SSL pfx file.",
    multiple: true,
    simpleType: "string",
  },
  "server-options-pfx-reset": {
    configs: [
      {
        description:
          "Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
        multiple: false,
        path: "server.options.pfx",
        type: "reset",
      },
    ],
    description:
      "Clear all items provided in 'server.options.pfx' configuration. Path to an SSL pfx file or content of an SSL pfx file.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-options-request-cert": {
    configs: [
      {
        description: "Request for an SSL certificate.",
        negatedDescription: "Does not request for an SSL certificate.",
        multiple: false,
        path: "server.options.requestCert",
        type: "boolean",
      },
    ],
    description: "Request for an SSL certificate.",
    multiple: false,
    simpleType: "boolean",
  },
  "server-type": {
    configs: [
      {
        description: "Allows to set server and options (by default 'http').",
        multiple: false,
        path: "server.type",
        type: "enum",
        values: ["http", "https", "spdy"],
      },
    ],
    description: "Allows to set server and options (by default 'http').",
    multiple: false,
    simpleType: "string",
  },
  static: {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Allows to configure options for serving static files from directory (by default 'public' directory).",
        path: "static[]",
      },
      {
        type: "boolean",
        multiple: false,
        description:
          "Allows to configure options for serving static files from directory (by default 'public' directory).",
        negatedDescription:
          "Disallows to configure options for serving static files from directory.",
        path: "static",
      },
    ],
    description:
      "Allows to configure options for serving static files from directory (by default 'public' directory).",
    simpleType: "string",
    multiple: true,
  },
  "static-directory": {
    configs: [
      {
        type: "string",
        multiple: true,
        description: "Directory for static contents.",
        path: "static[].directory",
      },
    ],
    description: "Directory for static contents.",
    simpleType: "string",
    multiple: true,
  },
  "static-public-path": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "The static files will be available in the browser under this public path.",
        path: "static[].publicPath",
      },
      {
        type: "string",
        multiple: true,
        description:
          "The static files will be available in the browser under this public path.",
        path: "static.publicPath[]",
      },
    ],
    description:
      "The static files will be available in the browser under this public path.",
    simpleType: "string",
    multiple: true,
  },
  "static-public-path-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.",
        path: "static.publicPath",
      },
    ],
    description:
      "Clear all items provided in 'static.publicPath' configuration. The static files will be available in the browser under this public path.",
    simpleType: "boolean",
    multiple: false,
  },
  "static-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).",
        path: "static",
      },
    ],
    description:
      "Clear all items provided in 'static' configuration. Allows to configure options for serving static files from directory (by default 'public' directory).",
    simpleType: "boolean",
    multiple: false,
  },
  "static-serve-index": {
    configs: [
      {
        type: "boolean",
        multiple: true,
        description:
          "Tells dev server to use serveIndex middleware when enabled.",
        negatedDescription:
          "Does not tell dev server to use serveIndex middleware.",
        path: "static[].serveIndex",
      },
    ],
    description: "Tells dev server to use serveIndex middleware when enabled.",
    simpleType: "boolean",
    multiple: true,
  },
  "static-watch": {
    configs: [
      {
        type: "boolean",
        multiple: true,
        description: "Watches for files in static content directory.",
        negatedDescription:
          "Does not watch for files in static content directory.",
        path: "static[].watch",
      },
    ],
    description: "Watches for files in static content directory.",
    simpleType: "boolean",
    multiple: true,
  },
  "watch-files": {
    configs: [
      {
        type: "string",
        multiple: true,
        description:
          "Allows to configure list of globs/directories/files to watch for file changes.",
        path: "watchFiles[]",
      },
    ],
    description:
      "Allows to configure list of globs/directories/files to watch for file changes.",
    simpleType: "string",
    multiple: true,
  },
  "watch-files-reset": {
    configs: [
      {
        type: "reset",
        multiple: false,
        description:
          "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.",
        path: "watchFiles",
      },
    ],
    description:
      "Clear all items provided in 'watchFiles' configuration. Allows to configure list of globs/directories/files to watch for file changes.",
    simpleType: "boolean",
    multiple: false,
  },
  "web-socket-server": {
    configs: [
      {
        description:
          "Deprecated: please use '--web-socket-server-type' option.",
        negatedDescription: "Disallows to set web socket server and options.",
        multiple: false,
        path: "webSocketServer",
        type: "enum",
        values: [false],
      },
      {
        description:
          "Deprecated: please use '--web-socket-server-type' option.",
        multiple: false,
     
Download .txt
gitextract_0seghhx2/

├── .cspell.json
├── .editorconfig
├── .gitattributes
├── .github/
│   ├── dependabot.yml
│   └── workflows/
│       ├── dependency-review.yml
│       └── nodejs.yml
├── .gitignore
├── .husky/
│   ├── commit-msg
│   └── pre-commit
├── .prettierignore
├── .versionrc
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── CONTRIBUTING.md
├── DOCUMENTATION-v4.md
├── LICENSE
├── README.md
├── babel.config.js
├── bin/
│   ├── cli-flags.js
│   └── webpack-dev-server.js
├── client-src/
│   ├── clients/
│   │   ├── SockJSClient.js
│   │   └── WebSocketClient.js
│   ├── globals.d.ts
│   ├── index.js
│   ├── modules/
│   │   ├── logger/
│   │   │   ├── index.js
│   │   │   └── tapable.js
│   │   └── sockjs-client/
│   │       └── index.js
│   ├── overlay.js
│   ├── progress.js
│   ├── socket.js
│   ├── utils/
│   │   ├── log.js
│   │   └── sendMessage.js
│   └── webpack.config.js
├── commitlint.config.js
├── eslint.config.mjs
├── examples/
│   ├── .assets/
│   │   ├── layout.html
│   │   └── style.css
│   ├── README.md
│   ├── api/
│   │   ├── internal-ip/
│   │   │   ├── README.md
│   │   │   └── app.js
│   │   ├── internal-ip-sync/
│   │   │   ├── README.md
│   │   │   └── app.js
│   │   ├── middleware/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── simple/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── start/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── start-callback/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── stop/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   └── stop-callback/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── server.js
│   │       └── webpack.config.js
│   ├── app/
│   │   ├── connect/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── hono/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── ssl/
│   │       │   ├── localhost-cert.pem
│   │       │   └── localhost-privkey.pem
│   │       └── webpack.config.js
│   ├── bonjour/
│   │   ├── boolean/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── object/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── client/
│   │   ├── logging/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── overlay/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── create-button.js
│   │   │   └── webpack.config.js
│   │   ├── progress/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── reconnect/
│   │   │   ├── false/
│   │   │   │   ├── README.md
│   │   │   │   ├── app.js
│   │   │   │   └── webpack.config.js
│   │   │   ├── number/
│   │   │   │   ├── README.md
│   │   │   │   ├── app.js
│   │   │   │   └── webpack.config.js
│   │   │   └── true/
│   │   │       ├── README.md
│   │   │       ├── app.js
│   │   │       └── webpack.config.js
│   │   ├── trusted-types-overlay/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── layout.html
│   │   │   └── webpack.config.js
│   │   └── web-socket-url/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── index.html
│   │       └── webpack.config.js
│   ├── compression/
│   │   ├── false/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── true/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── default/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── style.less
│   │   └── webpack.config.js
│   ├── dev-middleware/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── general/
│   │   ├── config-array/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── style.less
│   │   │   └── webpack.config.js
│   │   ├── config-promise/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── proxy-advanced/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── bypass.html
│   │   │   └── webpack.config.js
│   │   ├── proxy-hot-reload/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── proxy-config.js
│   │   │   └── webpack.config.js
│   │   ├── proxy-simple/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── universal-config/
│   │   │   ├── README.md
│   │   │   ├── client.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   └── webworker/
│   │       ├── README.md
│   │       ├── web.js
│   │       ├── webpack.config.js
│   │       └── worker.js
│   ├── headers/
│   │   ├── array/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── function/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   └── object/
│   │       ├── README.md
│   │       ├── app.js
│   │       └── webpack.config.js
│   ├── history-api-fallback/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── file.txt
│   │   └── webpack.config.js
│   ├── hmr/
│   │   ├── boolean/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── example.js
│   │   │   └── webpack.config.js
│   │   └── only/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── example.js
│   │       └── webpack.config.js
│   ├── host-and-port/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── ipc/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── multi-compiler/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── node-false/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── on-listening/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── open-target/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── open-target-multiple/
│   │   ├── README.md
│   │   ├── app1.js
│   │   ├── app2.js
│   │   └── webpack.config.js
│   ├── proxy/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── server/
│   │   ├── http2/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   └── webpack.config.js
│   │   ├── https/
│   │   │   ├── README.md
│   │   │   ├── app.js
│   │   │   ├── ssl/
│   │   │   │   ├── ca.pem
│   │   │   │   ├── server.crt
│   │   │   │   ├── server.key
│   │   │   │   └── server.pfx
│   │   │   └── webpack.config.js
│   │   └── spdy/
│   │       ├── README.md
│   │       ├── app.js
│   │       ├── ssl/
│   │       │   ├── ca.pem
│   │       │   ├── server.crt
│   │       │   ├── server.key
│   │       │   └── server.pfx
│   │       └── webpack.config.js
│   ├── setup-middlewares/
│   │   ├── README.md
│   │   ├── app.js
│   │   └── webpack.config.js
│   ├── util.js
│   ├── watch-static/
│   │   ├── README.md
│   │   ├── app.js
│   │   ├── assets/
│   │   │   └── index.html
│   │   ├── css/
│   │   │   └── styles.css
│   │   └── webpack.config.js
│   └── web-socket-server/
│       ├── sockjs/
│       │   ├── README.md
│       │   ├── app.js
│       │   └── webpack.config.js
│       └── ws/
│           ├── README.md
│           ├── app.js
│           └── webpack.config.js
├── jest.config.js
├── lib/
│   ├── Server.js
│   ├── getPort.js
│   ├── options.json
│   └── servers/
│       ├── BaseServer.js
│       ├── SockJSServer.js
│       └── WebsocketServer.js
├── lint-staged.config.js
├── migration-v4.md
├── migration-v5.md
├── package.json
├── scripts/
│   ├── extend-webpack-types.js
│   ├── globalSetupTest.js
│   ├── prepare-test-for-old-node.js
│   └── setupTest.js
├── test/
│   ├── __snapshots__/
│   │   ├── normalize-options.test.js.snap.webpack5
│   │   └── validate-options.test.js.snap.webpack5
│   ├── cli/
│   │   ├── __snapshots__/
│   │   │   ├── basic.test.js.snap.webpack5
│   │   │   ├── bonjour-option.test.js.snap.webpack5
│   │   │   ├── colors.test.js.snap.webpack5
│   │   │   ├── historyApiFallback-option.test.js.snap.webpack5
│   │   │   ├── host-option.test.js.snap.webpack5
│   │   │   ├── ipc-option.test.js.snap.webpack5
│   │   │   ├── port-option.test.js.snap.webpack5
│   │   │   ├── server-option.test.js.snap.webpack5
│   │   │   ├── static-option.test.js.snap.webpack5
│   │   │   └── watchFiles-option.test.js.snap.webpack5
│   │   ├── allowedHosts-option.test.js
│   │   ├── basic.test.js
│   │   ├── bonjour-option.test.js
│   │   ├── client-option.test.js
│   │   ├── colors.test.js
│   │   ├── compress-option.test.js
│   │   ├── historyApiFallback-option.test.js
│   │   ├── host-option.test.js
│   │   ├── hot-option.test.js
│   │   ├── ipc-option.test.js
│   │   ├── liveReload-option.test.js
│   │   ├── open-option.test.js
│   │   ├── port-option.test.js
│   │   ├── server-option.test.js
│   │   ├── static-option.test.js
│   │   ├── watchFiles-option.test.js
│   │   └── webSocketServer-option.test.js
│   ├── client/
│   │   ├── ReactErrorBoundary.test.js
│   │   ├── __snapshots__/
│   │   │   ├── index.test.js.snap.webpack5
│   │   │   └── socket-helper.test.js.snap.webpack5
│   │   ├── bundle.test.js
│   │   ├── clients/
│   │   │   ├── SockJSClient.test.js
│   │   │   ├── WebsocketClient.test.js
│   │   │   └── __snapshots__/
│   │   │       ├── SockJSClient.test.js.snap.webpack5
│   │   │       └── WebsocketClient.test.js.snap.webpack5
│   │   ├── index.test.js
│   │   ├── socket-helper.test.js
│   │   └── utils/
│   │       ├── __snapshots__/
│   │       │   ├── getCurrentScriptSource.test.js.snap.webpack5
│   │       │   ├── log.test.js.snap.webpack5
│   │       │   ├── reloadApp.test.js.snap.webpack5
│   │       │   └── sendMessage.test.js.snap.webpack5
│   │       ├── createSocketURL.test.js
│   │       ├── getCurrentScriptSource.test.js
│   │       ├── log.test.js
│   │       └── sendMessage.test.js
│   ├── e2e/
│   │   ├── __snapshots__/
│   │   │   ├── allowed-hosts.test.js.snap.webpack5
│   │   │   ├── api.test.js.snap.webpack5
│   │   │   ├── bonjour.test.js.snap.webpack5
│   │   │   ├── built-in-routes.test.js.snap.webpack5
│   │   │   ├── client-reconnect.test.js.snap.webpack5
│   │   │   ├── client.test.js.snap.webpack5
│   │   │   ├── compress.test.js.snap.webpack5
│   │   │   ├── entry.test.js.snap.webpack5
│   │   │   ├── headers.test.js.snap.webpack5
│   │   │   ├── history-api-fallback.test.js.snap.webpack5
│   │   │   ├── host.test.js.snap.webpack5
│   │   │   ├── hot-and-live-reload.test.js.snap.webpack5
│   │   │   ├── ipc.test.js.snap.webpack5
│   │   │   ├── logging.test.js.snap.webpack5
│   │   │   ├── mime-types.test.js.snap.webpack5
│   │   │   ├── module-federation.test.js.snap.webpack5
│   │   │   ├── multi-compiler.test.js.snap.webpack5
│   │   │   ├── on-listening.test.js.snap.webpack5
│   │   │   ├── overlay.test.js.snap.webpack5
│   │   │   ├── port.test.js.snap.webpack5
│   │   │   ├── server-and-client-transport.test.js.snap.webpack5
│   │   │   ├── server.test.js.snap.webpack5
│   │   │   ├── setup-exit-signals.test.js.snap.webpack5
│   │   │   ├── setup-middlewares.test.js.snap.webpack5
│   │   │   ├── static-directory.test.js.snap.webpack5
│   │   │   ├── static-public-path.test.js.snap.webpack5
│   │   │   ├── stats.test.js.snap.webpack5
│   │   │   ├── target.test.js.snap.webpack5
│   │   │   ├── watch-files.test.js.snap.webpack5
│   │   │   ├── web-socket-communication.test.js.snap.webpack5
│   │   │   ├── web-socket-server-url.test.js.snap.webpack5
│   │   │   └── web-socket-server.test.js.snap.webpack5
│   │   ├── allowed-hosts.test.js
│   │   ├── api.test.js
│   │   ├── app.test.js
│   │   ├── bonjour.test.js
│   │   ├── built-in-routes.test.js
│   │   ├── client-reconnect.test.js
│   │   ├── client.test.js
│   │   ├── compress.test.js
│   │   ├── cross-origin-request.test.js
│   │   ├── entry.test.js
│   │   ├── headers.test.js
│   │   ├── history-api-fallback.test.js
│   │   ├── host.test.js
│   │   ├── hot-and-live-reload.test.js
│   │   ├── ipc.test.js
│   │   ├── lazy-compilation.test.js
│   │   ├── logging.test.js
│   │   ├── mime-types.test.js
│   │   ├── module-federation.test.js
│   │   ├── multi-compiler.test.js
│   │   ├── on-listening.test.js
│   │   ├── options-middleware.test.js
│   │   ├── overlay.test.js
│   │   ├── port.test.js
│   │   ├── progress.test.js
│   │   ├── range-header.test.js
│   │   ├── server-and-client-transport.test.js
│   │   ├── server.test.js
│   │   ├── setup-exit-signals.test.js
│   │   ├── setup-middlewares.test.js
│   │   ├── static-directory.test.js
│   │   ├── static-public-path.test.js
│   │   ├── stats.test.js
│   │   ├── target.test.js
│   │   ├── watch-files.test.js
│   │   ├── web-socket-communication.test.js
│   │   ├── web-socket-server-url.test.js
│   │   └── web-socket-server.test.js
│   ├── fixtures/
│   │   ├── cli/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-default-stats/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-disabled/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-colors-enabled/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-empty-entry/
│   │   │   └── webpack.config.js
│   │   ├── cli-entry-as-descriptor/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-multi-entry/
│   │   │   ├── bar.js
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-promise-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-single-entry/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-target-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── cli-universal-compiler-config/
│   │   │   ├── client.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── client-config/
│   │   │   ├── bar.js
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   ├── static/
│   │   │   │   └── foo.txt
│   │   │   └── webpack.config.js
│   │   ├── custom-client/
│   │   │   ├── CustomClientEntry.js
│   │   │   ├── CustomClientHotEntry.js
│   │   │   └── CustomSockJSClient.js
│   │   ├── dev-public-path/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── dev-server/
│   │   │   ├── bar.js
│   │   │   ├── client-custom-path-config.js
│   │   │   ├── client-default-path-config.js
│   │   │   └── foo.js
│   │   ├── entry-as-function/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-2-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── other.html
│   │   │   ├── random-file.txt
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-3-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── historyapifallback-config/
│   │   │   ├── bar.html
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── https-certificate/
│   │   │   ├── ca.pem
│   │   │   ├── server.crt
│   │   │   ├── server.key
│   │   │   └── server.pfx
│   │   ├── lazy-compilation-multiple-entries/
│   │   │   ├── one.js
│   │   │   ├── two.js
│   │   │   └── webpack.config.js
│   │   ├── lazy-compilation-single-entry/
│   │   │   ├── entry.js
│   │   │   └── webpack.config.js
│   │   ├── mime-types-config/
│   │   │   ├── file.custom
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── module-federation-config/
│   │   │   ├── entry1.js
│   │   │   ├── entry2.js
│   │   │   ├── webpack.config.js
│   │   │   ├── webpack.multi.config.js
│   │   │   ├── webpack.object-entry.config.js
│   │   │   └── webpack.plugin.js
│   │   ├── multi-compiler-one-configuration/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── multi-compiler-two-configurations/
│   │   │   ├── one.js
│   │   │   ├── two.js
│   │   │   └── webpack.config.js
│   │   ├── multi-public-path-config/
│   │   │   ├── bar.js
│   │   │   ├── baz.js
│   │   │   ├── foo.js
│   │   │   ├── test.html
│   │   │   └── webpack.config.js
│   │   ├── overlay-config/
│   │   │   ├── foo.js
│   │   │   ├── trusted-types.webpack.config.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-custom/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-default/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-sockjs-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── provide-plugin-ws-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── proxy-config/
│   │   │   ├── foo.js
│   │   │   ├── index.html
│   │   │   └── webpack.config.js
│   │   ├── reload-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── reload-config-2/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── schema/
│   │   │   └── webpack.config.simple.js
│   │   ├── simple-config/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── simple-config-other/
│   │   │   ├── foo.js
│   │   │   └── webpack.config.js
│   │   ├── ssl/
│   │   │   ├── localhost-cert.pem
│   │   │   └── localhost-privkey.pem
│   │   ├── static/
│   │   │   ├── foo.js
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── static-config/
│   │   │   ├── foo.js
│   │   │   ├── other/
│   │   │   │   └── foo.html
│   │   │   ├── public/
│   │   │   │   ├── assets/
│   │   │   │   │   ├── example.txt
│   │   │   │   │   └── other.txt
│   │   │   │   ├── bar/
│   │   │   │   │   └── index.html
│   │   │   │   ├── foo.wasm
│   │   │   │   ├── index.html
│   │   │   │   ├── node_modules/
│   │   │   │   │   └── .gitkeep
│   │   │   │   └── other.html
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── universal-compiler-config/
│   │   │   ├── browser.js
│   │   │   ├── server.js
│   │   │   └── webpack.config.js
│   │   ├── watch-files-config/
│   │   │   ├── foo.js
│   │   │   ├── other/
│   │   │   │   └── foo.html
│   │   │   ├── public/
│   │   │   │   ├── assets/
│   │   │   │   │   ├── example.txt
│   │   │   │   │   └── other.txt
│   │   │   │   ├── bar/
│   │   │   │   │   └── index.html
│   │   │   │   └── other.html
│   │   │   ├── static/
│   │   │   │   └── index.html
│   │   │   └── webpack.config.js
│   │   ├── worker-config/
│   │   │   ├── index.js
│   │   │   ├── webpack.config.js
│   │   │   └── worker.js
│   │   └── worker-config-dev-server-false/
│   │       ├── index.js
│   │       ├── webpack.config.js
│   │       └── worker.js
│   ├── helpers/
│   │   ├── ExitOnDonePlugin.js
│   │   ├── conditional-test.js
│   │   ├── custom-http.js
│   │   ├── html-generator-plugin.js
│   │   ├── normalize-options.js
│   │   ├── puppeteer-constants.js
│   │   ├── run-browser.js
│   │   ├── session-subscribe.js
│   │   ├── snapshotResolver.js
│   │   ├── test-bin.js
│   │   ├── test-server.js
│   │   └── trusted-types-html-generator-plugin.js
│   ├── normalize-options.test.js
│   ├── ports-map.js
│   ├── server/
│   │   ├── open-option.test.js
│   │   └── proxy-option.test.js
│   └── validate-options.test.js
├── tsconfig.client.json
├── tsconfig.json
└── types/
    ├── bin/
    │   ├── cli-flags.d.ts
    │   └── webpack-dev-server.d.ts
    └── lib/
        ├── Server.d.ts
        ├── getPort.d.ts
        └── servers/
            ├── BaseServer.d.ts
            ├── SockJSServer.d.ts
            └── WebsocketServer.d.ts
Download .txt
SYMBOL INDEX (235 symbols across 57 files)

FILE: bin/webpack-dev-server.js
  method preprocess (line 120) | preprocess() {

FILE: client-src/clients/SockJSClient.js
  class SockJSClient (line 9) | class SockJSClient {
    method constructor (line 13) | constructor(url) {
    method onOpen (line 26) | onOpen(fn) {
    method onClose (line 33) | onClose(fn) {
    method onMessage (line 41) | onMessage(fn) {

FILE: client-src/clients/WebSocketClient.js
  class WebSocketClient (line 8) | class WebSocketClient {
    method constructor (line 12) | constructor(url) {
    method onOpen (line 22) | onOpen(fn) {
    method onClose (line 29) | onClose(fn) {
    method onMessage (line 37) | onMessage(fn) {

FILE: client-src/globals.d.ts
  type CommunicationClient (line 1) | interface CommunicationClient {
  type CommunicationClientConstructor (line 7) | interface CommunicationClientConstructor {

FILE: client-src/index.js
  function applyReload (line 305) | function applyReload(rootWindow, intervalId) {
  method hot (line 389) | hot() {
  method liveReload (line 396) | liveReload() {
  method invalid (line 403) | invalid() {
  method hash (line 416) | hash(hash) {
  method overlay (line 424) | overlay(value) {
  method reconnect (line 435) | reconnect(value) {
  method progress (line 445) | progress(value) {
  method ok (line 482) | ok() {
  method warnings (line 507) | warnings(warnings, params) {
  method errors (line 551) | errors(errors) {
  method error (line 589) | error(error) {
  method close (line 592) | close() {

FILE: client-src/modules/logger/tapable.js
  function SyncBailHook (line 5) | function SyncBailHook() {

FILE: client-src/overlay.js
  function encode (line 64) | function encode(text) {
  function createMachine (line 119) | function createMachine({ states, context, initial }, { actions }) {
  function applyStyle (line 464) | function applyStyle(element, style) {
  function createContainer (line 475) | function createContainer(trustedTypesPolicyName) {
  function ensureOverlayExists (line 550) | function ensureOverlayExists(callback, trustedTypesPolicyName) {
  function hide (line 575) | function hide() {
  function show (line 594) | function show(type, messages, trustedTypesPolicyName, messageSource) {

FILE: client-src/progress.js
  function isProgressSupported (line 4) | function isProgressSupported() {
  function defineProgressElement (line 13) | function defineProgressElement() {

FILE: client-src/socket.js
  function socket (line 41) | function socket(url, handlers, reconnect) {

FILE: client-src/utils/log.js
  function setLogLevel (line 13) | function setLogLevel(level) {

FILE: client-src/utils/sendMessage.js
  function sendMsg (line 10) | function sendMsg(type, data) {

FILE: examples/client/logging/webpack.config.js
  method apply (line 12) | apply(compiler) {

FILE: examples/client/overlay/app.js
  function unsafeOperation (line 8) | function unsafeOperation(errorMessage) {

FILE: examples/general/proxy-advanced/webpack.config.js
  method bypass (line 18) | bypass(req) {

FILE: examples/history-api-fallback/app.js
  function check (line 75) | function check(url, re, cb) {

FILE: examples/proxy/webpack.config.js
  function listenProxyServer (line 11) | async function listenProxyServer() {

FILE: examples/util.js
  method setup (line 10) | setup(config) {

FILE: lib/Server.js
  function useFn (line 311) | function useFn(route, fn) {
  constant DEFAULT_ALLOWED_PROTOCOLS (line 315) | const DEFAULT_ALLOWED_PROTOCOLS = /^(file|.+-extension):/i;
  class Server (line 326) | class Server {
    method constructor (line 331) | constructor(options, compiler) {
    method schema (line 370) | static get schema() {
    method DEFAULT_STATS (line 378) | static get DEFAULT_STATS() {
    method isAbsoluteURL (line 392) | static isAbsoluteURL(URL) {
    method findIp (line 408) | static findIp(gatewayOrFamily, isInternal) {
    method internalIP (line 483) | static async internalIP(family) {
    method internalIPSync (line 492) | static internalIPSync(family) {
    method getHostname (line 500) | static async getHostname(hostname) {
    method getFreePort (line 519) | static async getFreePort(port, host) {
    method findCacheDir (line 548) | static findCacheDir() {
    method isWebTarget (line 588) | static isWebTarget(compiler) {
    method addAdditionalEntries (line 631) | addAdditionalEntries(compiler) {
    method getCompilerOptions (line 827) | getCompilerOptions() {
    method normalizeOptions (line 882) | async normalizeOptions() {
    method getClientTransport (line 1552) | getClientTransport() {
    method getServerTransport (line 1631) | getServerTransport() {
    method getClientEntry (line 1690) | getClientEntry() {
    method getClientHotEntry (line 1697) | getClientHotEntry() {
    method setupProgressPlugin (line 1709) | setupProgressPlugin() {
    method initialize (line 1753) | async initialize() {
    method setupApp (line 1867) | async setupApp() {
    method getStats (line 1883) | getStats(statsObj) {
    method setupHooks (line 1903) | setupHooks() {
    method setupWatchStaticFiles (line 1932) | setupWatchStaticFiles() {
    method setupWatchFiles (line 1948) | setupWatchFiles() {
    method setupMiddlewares (line 1962) | setupMiddlewares() {
    method createServer (line 2599) | async createServer() {
    method createWebSocketServer (line 2663) | createWebSocketServer() {
    method openBrowser (line 2784) | async openBrowser(defaultOpenTarget) {
    method runBonjour (line 2831) | runBonjour() {
    method stopBonjour (line 2855) | stopBonjour(callback = () => {}) {
    method logStatus (line 2871) | async logStatus() {
    method setHeaders (line 3096) | setHeaders(req, res, next) {
    method isHostAllowed (line 3138) | isHostAllowed(value) {
    method isValidHost (line 3194) | isValidHost(headers, headerToCheck, validateHost = true) {
    method isSameOrigin (line 3254) | isSameOrigin(headers) {
    method sendMessage (line 3316) | sendMessage(clients, type, data, params) {
    method sendStats (line 3333) | sendStats(clients, stats, force) {
    method watchFiles (line 3388) | watchFiles(watchPath, watchOptions) {
    method invalidate (line 3412) | invalidate(callback = () => {}) {
    method start (line 3421) | async start() {
    method startCallback (line 3515) | startCallback(callback = () => {}) {
    method stop (line 3524) | async stop() {
    method stopCallback (line 3609) | stopCallback(callback = () => {}) {

FILE: lib/getPort.js
  function getPorts (line 94) | async function getPorts(basePort, host) {

FILE: lib/servers/BaseServer.js
  method constructor (line 11) | constructor(server) {

FILE: lib/servers/SockJSServer.js
  method constructor (line 42) | constructor(server) {

FILE: lib/servers/WebsocketServer.js
  method constructor (line 15) | constructor(server) {

FILE: scripts/extend-webpack-types.js
  function extendTypes (line 9) | async function extendTypes() {

FILE: scripts/globalSetupTest.js
  function validatePorts (line 13) | async function validatePorts() {

FILE: scripts/prepare-test-for-old-node.js
  function setup (line 9) | async function setup() {

FILE: test/e2e/allowed-hosts.test.js
  function startProxy (line 37) | function startProxy(callback) {
  function startProxy (line 109) | function startProxy(callback) {
  function startProxy (line 182) | function startProxy(callback) {
  function startProxy (line 256) | function startProxy(callback) {
  function startProxy (line 330) | function startProxy(callback) {
  function startProxy (line 405) | function startProxy(callback) {
  function startProxy (line 479) | function startProxy(callback) {
  function startProxy (line 556) | function startProxy(callback) {
  function startProxy (line 633) | function startProxy(callback) {
  function startProxy (line 711) | function startProxy(callback) {
  function startProxy (line 789) | function startProxy(callback) {
  function startProxy (line 867) | function startProxy(callback) {
  function startProxy (line 945) | function startProxy(callback) {
  function startProxy (line 1026) | function startProxy(callback) {
  function startProxy (line 1104) | function startProxy(callback) {
  function startProxy (line 1182) | function startProxy(callback) {
  function startProxy (line 1262) | function startProxy(callback) {
  function startProxy (line 1341) | function startProxy(callback) {
  function startProxy (line 1419) | function startProxy(callback) {
  function startProxy (line 1501) | function startProxy(callback) {

FILE: test/e2e/api.test.js
  function createDummyServers (line 380) | function createDummyServers(n) {

FILE: test/e2e/client.test.js
  class OverrideServer (line 202) | class OverrideServer extends Server {
    method getClientEntry (line 203) | getClientEntry() {
    method getClientHotEntry (line 209) | getClientHotEntry() {

FILE: test/e2e/entry.test.js
  constant HOT_ENABLED_MESSAGE (line 10) | const HOT_ENABLED_MESSAGE =

FILE: test/e2e/host.test.js
  function getAddress (line 13) | async function getAddress(host, hostname) {

FILE: test/e2e/hot-and-live-reload.test.js
  constant INVALID_MESSAGE (line 25) | const INVALID_MESSAGE = "[webpack-dev-server] App updated. Recompiling...";

FILE: test/e2e/ipc.test.js
  function startProxy (line 35) | function startProxy(callback) {
  function startProxy (line 137) | function startProxy(callback) {
  function startProxy (line 257) | function startProxy(callback) {

FILE: test/e2e/logging.test.js
  method apply (line 66) | apply(compiler) {
  method apply (line 86) | apply(compiler) {
  method apply (line 136) | apply(compiler) {
  method apply (line 162) | apply(compiler) {

FILE: test/e2e/overlay.test.js
  class ErrorPlugin (line 13) | class ErrorPlugin {
    method constructor (line 14) | constructor(message, skipCounter) {
    method apply (line 21) | apply(compiler) {
  class WarningPlugin (line 40) | class WarningPlugin {
    method constructor (line 41) | constructor(message, skipCounter) {
    method apply (line 47) | apply(compiler) {

FILE: test/e2e/stats.test.js
  method apply (line 68) | apply(compiler) {
  method apply (line 92) | apply(compiler) {

FILE: test/e2e/web-socket-server-url.test.js
  function startProxy (line 35) | function startProxy(callback) {
  function startProxy (line 130) | function startProxy(callback) {
  function startProxy (line 231) | function startProxy(callback) {
  function startProxy (line 330) | function startProxy(callback) {

FILE: test/fixtures/custom-client/CustomSockJSClient.js
  method constructor (line 6) | constructor(url) {
  method onOpen (line 12) | onOpen(f) {
  method onClose (line 19) | onClose(f) {
  method onMessage (line 27) | onMessage(f) {

FILE: test/fixtures/entry-as-function/webpack.config.js
  method apply (line 9) | apply(compiler) {

FILE: test/fixtures/lazy-compilation-multiple-entries/webpack.config.js
  method apply (line 49) | apply(compiler) {

FILE: test/fixtures/lazy-compilation-single-entry/webpack.config.js
  method apply (line 35) | apply(compiler) {

FILE: test/helpers/ExitOnDonePlugin.js
  method apply (line 4) | apply(compiler) {

FILE: test/helpers/conditional-test.js
  function skipTestOnWindows (line 11) | function skipTestOnWindows(reason) {

FILE: test/helpers/html-generator-plugin.js
  method apply (line 45) | apply(compiler) {

FILE: test/helpers/normalize-options.js
  function normalizeOptions (line 7) | function normalizeOptions(options) {

FILE: test/helpers/run-browser.js
  function runPage (line 21) | function runPage(browser, device) {
  function runBrowser (line 69) | function runBrowser(device) {

FILE: test/helpers/test-bin.js
  method write (line 68) | write(chunk, encoding, callback) {
  method write (line 83) | write(chunk, encoding, callback) {

FILE: test/helpers/test-server.js
  function startFullSetup (line 22) | function startFullSetup(config, devServerConfig, done) {
  function start (line 57) | function start(config, devServerConfig, done) {
  function close (line 88) | function close(done) {

FILE: test/helpers/trusted-types-html-generator-plugin.js
  method apply (line 39) | apply(compiler) {

FILE: test/normalize-options.test.js
  method constructor (line 63) | constructor() {

FILE: test/ports-map.js
  method get (line 104) | get(target, name) {

FILE: test/server/proxy-option.test.js
  method bypass (line 28) | bypass(req) {
  method bypass (line 38) | bypass(req) {
  method bypass (line 46) | bypass(req, res) {
  method bypass (line 62) | bypass(req) {
  function listenProxyServers (line 143) | async function listenProxyServers() {
  function closeProxyServers (line 170) | async function closeProxyServers() {

FILE: test/validate-options.test.js
  function stringifyValue (line 570) | function stringifyValue(value) {
  function createTestCase (line 600) | function createTestCase(type, key, value) {

FILE: types/bin/webpack-dev-server.d.ts
  type CliOption (line 2) | type CliOption = {

FILE: types/lib/Server.d.ts
  class Server (line 10) | class Server<
  type Schema (line 1497) | type Schema = import("schema-utils/declarations/validate").Schema;
  type Compiler (line 1498) | type Compiler = import("webpack").Compiler;
  type MultiCompiler (line 1499) | type MultiCompiler = import("webpack").MultiCompiler;
  type WebpackConfiguration (line 1500) | type WebpackConfiguration = import("webpack").Configuration;
  type StatsOptions (line 1501) | type StatsOptions = import("webpack").StatsOptions;
  type StatsCompilation (line 1502) | type StatsCompilation = import("webpack").StatsCompilation;
  type Stats (line 1503) | type Stats = import("webpack").Stats;
  type MultiStats (line 1504) | type MultiStats = import("webpack").MultiStats;
  type NetworkInterfaceInfo (line 1505) | type NetworkInterfaceInfo = import("os").NetworkInterfaceInfo;
  type WatchOptions (line 1506) | type WatchOptions = import("chokidar").WatchOptions;
  type FSWatcher (line 1507) | type FSWatcher = import("chokidar").FSWatcher;
  type ConnectHistoryApiFallbackOptions (line 1508) | type ConnectHistoryApiFallbackOptions =
  type Bonjour (line 1510) | type Bonjour = import("bonjour-service").Bonjour;
  type BonjourOptions (line 1511) | type BonjourOptions = import("bonjour-service").Service;
  type RequestHandler (line 1512) | type RequestHandler = import("http-proxy-middleware").RequestHandler;
  type HttpProxyMiddlewareOptions (line 1513) | type HttpProxyMiddlewareOptions = import("http-proxy-middleware").Options;
  type HttpProxyMiddlewareOptionsFilter (line 1514) | type HttpProxyMiddlewareOptionsFilter = import("http-proxy-middleware")....
  type ServeIndexOptions (line 1515) | type ServeIndexOptions = import("serve-index").Options;
  type ServeStaticOptions (line 1516) | type ServeStaticOptions = import("serve-static").ServeStaticOptions;
  type IPv4 (line 1517) | type IPv4 = import("ipaddr.js").IPv4;
  type IPv6 (line 1518) | type IPv6 = import("ipaddr.js").IPv6;
  type Socket (line 1519) | type Socket = import("net").Socket;
  type HTTPServer (line 1520) | type HTTPServer = import("http").Server;
  type IncomingMessage (line 1521) | type IncomingMessage = import("http").IncomingMessage;
  type ServerResponse (line 1522) | type ServerResponse = import("http").ServerResponse;
  type OpenOptions (line 1523) | type OpenOptions = import("open").Options;
  type ExpressApplication (line 1524) | type ExpressApplication = import("express").Application;
  type ExpressRequestHandler (line 1525) | type ExpressRequestHandler = import("express").RequestHandler;
  type ExpressErrorRequestHandler (line 1526) | type ExpressErrorRequestHandler = import("express").ErrorRequestHandler;
  type ExpressRequest (line 1527) | type ExpressRequest = import("express").Request;
  type ExpressResponse (line 1528) | type ExpressResponse = import("express").Response;
  type EXPECTED_ANY (line 1529) | type EXPECTED_ANY = any;
  type NextFunction (line 1530) | type NextFunction = (err?: EXPECTED_ANY) => void;
  type SimpleHandleFunction (line 1531) | type SimpleHandleFunction = (req: IncomingMessage, res: ServerResponse) ...
  type NextHandleFunction (line 1532) | type NextHandleFunction = (
  type ErrorHandleFunction (line 1537) | type ErrorHandleFunction = (
  type HandleFunction (line 1543) | type HandleFunction =
  type ServerOptions (line 1547) | type ServerOptions = import("https").ServerOptions & {
  type Request (line 1556) | type Request<T extends BasicApplication = import("express").Application> =
  type Response (line 1558) | type Response<T extends BasicApplication = import("express").Application> =
  type DevMiddlewareOptions (line 1560) | type DevMiddlewareOptions<
  type DevMiddlewareContext (line 1564) | type DevMiddlewareContext<
  type Host (line 1568) | type Host = "local-ip" | "local-ipv4" | "local-ipv6" | string;
  type Port (line 1569) | type Port = number | string | "auto";
  type WatchFiles (line 1570) | type WatchFiles = {
  type Static (line 1586) | type Static = {
  type NormalizedStatic (line 1617) | type NormalizedStatic = {
  type ServerType (line 1624) | type ServerType<
  type ServerConfiguration (line 1637) | type ServerConfiguration<
  type WebSocketServerConfiguration (line 1653) | type WebSocketServerConfiguration = {
  method logging (line 1749) | logging?:

FILE: types/lib/servers/BaseServer.d.ts
  class BaseServer (line 2) | class BaseServer {
  type ClientConnection (line 15) | type ClientConnection = import("../Server").ClientConnection;

FILE: types/lib/servers/SockJSServer.d.ts
  class SockJSServer (line 2) | class SockJSServer extends BaseServer {
  type WebSocketServerConfiguration (line 10) | type WebSocketServerConfiguration =
  type ClientConnection (line 12) | type ClientConnection = import("../Server").ClientConnection;

FILE: types/lib/servers/WebsocketServer.d.ts
  class WebsocketServer (line 2) | class WebsocketServer extends BaseServer {
  type WebSocketServerConfiguration (line 14) | type WebSocketServerConfiguration =
  type ClientConnection (line 16) | type ClientConnection = import("../Server").ClientConnection;
Condensed preview — 519 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,949K chars).
[
  {
    "path": ".cspell.json",
    "chars": 1388,
    "preview": "{\n  \"version\": \"0.2\",\n  \"language\": \"en,en-gb\",\n  \"words\": [\n    \"apos\",\n    \"camelcase\",\n    \"tapable\",\n    \"sockjs\",\n "
  },
  {
    "path": ".editorconfig",
    "chars": 224,
    "preview": "# editorconfig.org\n\n[*]\ncharset = utf-8\nindent_style = space\nindent_size = 2\nend_of_line = lf\ninsert_final_newline = tru"
  },
  {
    "path": ".gitattributes",
    "chars": 25,
    "preview": "* text=auto\nbin/* eol=lf\n"
  },
  {
    "path": ".github/dependabot.yml",
    "chars": 290,
    "preview": "version: 2\nupdates:\n  - package-ecosystem: npm\n    directory: \"/\"\n    schedule:\n      interval: daily\n      time: \"04:00"
  },
  {
    "path": ".github/workflows/dependency-review.yml",
    "chars": 296,
    "preview": "name: \"Dependency Review\"\non: [pull_request]\n\npermissions:\n  contents: read\n\njobs:\n  dependency-review:\n    runs-on: ubu"
  },
  {
    "path": ".github/workflows/nodejs.yml",
    "chars": 3546,
    "preview": "name: webpack-dev-server\n\non:\n  push:\n    branches:\n      - main\n      - next\n      - v4\n  pull_request:\n    branches:\n "
  },
  {
    "path": ".gitignore",
    "chars": 450,
    "preview": ".DS_Store\n\nnpm-debug.log\n\n.idea\n\nclient\n!/examples/client\n!/test/client\ncoverage\nnode_modules\n.vscode\nyarn.lock\nyarn-err"
  },
  {
    "path": ".husky/commit-msg",
    "chars": 21,
    "preview": "commitlint --edit $1\n"
  },
  {
    "path": ".husky/pre-commit",
    "chars": 12,
    "preview": "lint-staged\n"
  },
  {
    "path": ".prettierignore",
    "chars": 102,
    "preview": "/client\n!/test/client\ncoverage\nnode_modules\nCHANGELOG.md\nexamples/client/trusted-types-overlay/app.js\n"
  },
  {
    "path": ".versionrc",
    "chars": 141,
    "preview": "{\n  \"types\": [\n    {\"type\":\"feat\",\"section\":\"Features\"},\n    {\"type\":\"fix\",\"section\":\"Bug Fixes\"},\n    {\"type\":\"test\", \""
  },
  {
    "path": "CHANGELOG.md",
    "chars": 80939,
    "preview": "# Changelog\n\nAll notable changes to this project will be documented in this file. See [standard-version](https://github."
  },
  {
    "path": "CODE_OF_CONDUCT.md",
    "chars": 382,
    "preview": "## Code of Conduct\n\nAt webpack and webpack/webpack-dev-server repository we follow the [JSFoundation Code of Conduct][1]"
  },
  {
    "path": "CONTRIBUTING.md",
    "chars": 6169,
    "preview": "# Contributing to webpack-dev-server\n\nDo you use webpack-dev-server and want to help us out? Thanks!\n\nPlease review this"
  },
  {
    "path": "DOCUMENTATION-v4.md",
    "chars": 42481,
    "preview": "[webpack-dev-server](https://github.com/webpack/webpack-dev-server) can be used to quickly develop an application. See t"
  },
  {
    "path": "LICENSE",
    "chars": 1071,
    "preview": "Copyright JS Foundation and other contributors\n\nPermission is hereby granted, free of charge, to any person obtaining\na "
  },
  {
    "path": "README.md",
    "chars": 19988,
    "preview": "<div align=\"center\">\n  <a href=\"https://github.com/webpack/webpack\">\n    <img width=\"200\" height=\"200\" src=\"https://webp"
  },
  {
    "path": "babel.config.js",
    "chars": 629,
    "preview": "\"use strict\";\n\nmodule.exports = (api) => {\n  api.cache(true);\n\n  return {\n    presets: [\n      [\n        \"@babel/preset-"
  },
  {
    "path": "bin/cli-flags.js",
    "chars": 40632,
    "preview": "\"use strict\";\n\nmodule.exports = {\n  \"allowed-hosts\": {\n    configs: [\n      {\n        type: \"string\",\n        multiple: "
  },
  {
    "path": "bin/webpack-dev-server.js",
    "chars": 4898,
    "preview": "#!/usr/bin/env node\n/* Based on webpack/bin/webpack.js */\n/* eslint-disable no-console */\n\n\"use strict\";\n\n/**\n * @param "
  },
  {
    "path": "client-src/clients/SockJSClient.js",
    "chars": 986,
    "preview": "import SockJS from \"../modules/sockjs-client/index.js\";\nimport { log } from \"../utils/log.js\";\n\n/** @typedef {import(\".."
  },
  {
    "path": "client-src/clients/WebSocketClient.js",
    "chars": 838,
    "preview": "import { log } from \"../utils/log.js\";\n\n/** @typedef {import(\"../index\").EXPECTED_ANY} EXPECTED_ANY */\n\n/**\n * @implemen"
  },
  {
    "path": "client-src/globals.d.ts",
    "chars": 733,
    "preview": "declare interface CommunicationClient {\n  onOpen(fn: (...args: any[]) => void): void;\n  onClose(fn: (...args: any[]) => "
  },
  {
    "path": "client-src/index.js",
    "chars": 21085,
    "preview": "/* global __resourceQuery, __webpack_hash__ */\n// @ts-expect-error\nimport hotEmitter from \"webpack/hot/emitter.js\";\n// @"
  },
  {
    "path": "client-src/modules/logger/index.js",
    "chars": 78,
    "preview": "// @ts-expect-error\nexport { default } from \"webpack/lib/logging/runtime.js\";\n"
  },
  {
    "path": "client-src/modules/logger/tapable.js",
    "chars": 206,
    "preview": "/**\n * @returns {SyncBailHook} mocked sync bail hook\n * @constructor\n */\nfunction SyncBailHook() {\n  return {\n    call()"
  },
  {
    "path": "client-src/modules/sockjs-client/index.js",
    "chars": 41,
    "preview": "export { default } from \"sockjs-client\";\n"
  },
  {
    "path": "client-src/overlay.js",
    "chars": 20931,
    "preview": "// The error overlay is inspired (and mostly copied) from Create React App (https://github.com/facebookincubator/create-"
  },
  {
    "path": "client-src/progress.js",
    "chars": 6201,
    "preview": "/**\n * @returns {boolean} true when custom elements supported, otherwise false\n */\nexport function isProgressSupported()"
  },
  {
    "path": "client-src/socket.js",
    "chars": 2543,
    "preview": "/* global __webpack_dev_server_client__ */\n\nimport WebSocketClient from \"./clients/WebSocketClient.js\";\nimport { log } f"
  },
  {
    "path": "client-src/utils/log.js",
    "chars": 549,
    "preview": "import logger from \"../modules/logger/index.js\";\n\nconst name = \"webpack-dev-server\";\n// default level is set on the clie"
  },
  {
    "path": "client-src/utils/sendMessage.js",
    "chars": 493,
    "preview": "/* global WorkerGlobalScope */\n\n/** @typedef {import(\"../index\").EXPECTED_ANY} EXPECTED_ANY */\n\n// Send messages to the "
  },
  {
    "path": "client-src/webpack.config.js",
    "chars": 1741,
    "preview": "\"use strict\";\n\nconst path = require(\"node:path\");\nconst webpack = require(\"webpack\");\nconst { merge } = require(\"webpack"
  },
  {
    "path": "commitlint.config.js",
    "chars": 199,
    "preview": "\"use strict\";\n\nmodule.exports = {\n  extends: [\"@commitlint/config-conventional\"],\n  rules: {\n    \"header-max-length\": [0"
  },
  {
    "path": "eslint.config.mjs",
    "chars": 703,
    "preview": "import { defineConfig, globalIgnores } from \"eslint/config\";\nimport config from \"eslint-config-webpack\";\nimport configs "
  },
  {
    "path": "examples/.assets/layout.html",
    "chars": 849,
    "preview": "<!doctype html>\n<html>\n  <head>\n    <title>WDS ▻ <%= htmlWebpackPlugin.options.title %></title>\n    <meta charset=\"utf-8"
  },
  {
    "path": "examples/.assets/style.css",
    "chars": 1820,
    "preview": "@font-face {\n  font-family: \"Geomanist\";\n  font-style: normal;\n  font-weight: 600;\n  src:\n    url(\"assets/geomanist-medi"
  },
  {
    "path": "examples/README.md",
    "chars": 1170,
    "preview": "# Examples\n\nEach example showcases a particular feature of `webpack-dev-server`. You can use\nthese examples to learn how"
  },
  {
    "path": "examples/api/internal-ip/README.md",
    "chars": 589,
    "preview": "# internalIP(family: \"v4\" | \"v6\")\n\nReturns the internal IP address asynchronously.\n\n```js\nconst WebpackDevServer = requi"
  },
  {
    "path": "examples/api/internal-ip/app.js",
    "chars": 353,
    "preview": "\"use strict\";\n\nconst WebpackDevServer = require(\"../../../lib/Server\");\n\nconst logInternalIPs = async () => {\n  const lo"
  },
  {
    "path": "examples/api/internal-ip-sync/README.md",
    "chars": 521,
    "preview": "# internalIPSync(family: \"v4\" | \"v6\")\n\nReturns the internal IP address synchronously.\n\n```js\nconst WebpackDevServer = re"
  },
  {
    "path": "examples/api/internal-ip-sync/app.js",
    "chars": 282,
    "preview": "\"use strict\";\n\nconst WebpackDevServer = require(\"../../../lib/Server\");\n\nconst localIPv4 = WebpackDevServer.internalIPSy"
  },
  {
    "path": "examples/api/middleware/README.md",
    "chars": 570,
    "preview": "# API: Custom Middleware\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also\nchoose to start a"
  },
  {
    "path": "examples/api/middleware/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/middleware/server.js",
    "chars": 409,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/middleware/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/api/simple/README.md",
    "chars": 664,
    "preview": "# API: Simple Server\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also\nchoose to start a ser"
  },
  {
    "path": "examples/api/simple/app.js",
    "chars": 321,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/simple/server.js",
    "chars": 428,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/simple/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/api/start/README.md",
    "chars": 907,
    "preview": "# API: start\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also\nchoose to start a server via "
  },
  {
    "path": "examples/api/start/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/start/server.js",
    "chars": 446,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/start/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/api/start-callback/README.md",
    "chars": 1069,
    "preview": "# API: startCallback(callback)\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also choose to s"
  },
  {
    "path": "examples/api/start-callback/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/start-callback/server.js",
    "chars": 440,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/start-callback/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/api/stop/README.md",
    "chars": 1273,
    "preview": "# API: stop\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also\nchoose to stop a server via th"
  },
  {
    "path": "examples/api/stop/app.js",
    "chars": 160,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/stop/server.js",
    "chars": 574,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/stop/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/api/stop-callback/README.md",
    "chars": 1337,
    "preview": "# API: stopCallback(callback)\n\nWhile it's recommended to run `webpack-dev-server` via the CLI, you may also choose to st"
  },
  {
    "path": "examples/api/stop-callback/app.js",
    "chars": 160,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/api/stop-callback/server.js",
    "chars": 569,
    "preview": "\"use strict\";\n\nconst Webpack = require(\"webpack\");\nconst WebpackDevServer = require(\"../../../lib/Server\");\nconst webpac"
  },
  {
    "path": "examples/api/stop-callback/webpack.config.js",
    "chars": 304,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/app/connect/README.md",
    "chars": 443,
    "preview": "# `app` Option\n\nServe using [`connect`](https://github.com/senchalabs/connect) as an application.\n\n**webpack.config.js**"
  },
  {
    "path": "examples/app/connect/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/app/connect/webpack.config.js",
    "chars": 308,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst co"
  },
  {
    "path": "examples/app/hono/README.md",
    "chars": 433,
    "preview": "# `app` Option\n\nServe using [`hono`](https://github.com/honojs/hono) as an application.\n\n**webpack.config.js**\n\n```js\nco"
  },
  {
    "path": "examples/app/hono/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/app/hono/ssl/localhost-cert.pem",
    "chars": 1115,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIDCTCCAfGgAwIBAgIUevWiuCfenWuq9KyC8aQ/tc1Io14wDQYJKoZIhvcNAQEL\nBQAwFDESMBAGA1UEAwwJbG9jYWx"
  },
  {
    "path": "examples/app/hono/ssl/localhost-privkey.pem",
    "chars": 1700,
    "preview": "-----BEGIN PRIVATE KEY-----\nMIIEugIBADANBgkqhkiG9w0BAQEFAASCBKQwggSgAgEAAoIBAQDW/+Vv271aSqQX\nvOMgp7ZH5vhLSxCdYh8EVnSCC1o"
  },
  {
    "path": "examples/app/hono/webpack.config.js",
    "chars": 1819,
    "preview": "\"use strict\";\n\nconst { createAdaptorServer } = require(\"@hono/node-server\");\n// eslint-disable-next-line import/no-unres"
  },
  {
    "path": "examples/bonjour/boolean/README.md",
    "chars": 417,
    "preview": "# Bonjour (ZeroConf)\n\nThe Bonjour capability broadcasts server information via ZeroConf when the Server\nis started.\n\n## "
  },
  {
    "path": "examples/bonjour/boolean/app.js",
    "chars": 124,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.innerHTML = \"Please check your Zeroconf service"
  },
  {
    "path": "examples/bonjour/boolean/webpack.config.js",
    "chars": 265,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/bonjour/object/README.md",
    "chars": 612,
    "preview": "# Bonjour (ZeroConf)\n\nThe Bonjour capability broadcasts server information via ZeroConf when the Server\nis started.\n\n## "
  },
  {
    "path": "examples/bonjour/object/app.js",
    "chars": 124,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.innerHTML = \"Please check your Zeroconf service"
  },
  {
    "path": "examples/bonjour/object/webpack.config.js",
    "chars": 349,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/logging/README.md",
    "chars": 930,
    "preview": "# client.logging Option\n\n`'log' | 'info' | 'warn' | 'error' | 'none' | 'verbose'`\n\nAllows to set log level in the browse"
  },
  {
    "path": "examples/client/logging/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/client/logging/webpack.config.js",
    "chars": 615,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/overlay/README.md",
    "chars": 1908,
    "preview": "# client.overlay option\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n  devServer: {\n    client: {\n      ove"
  },
  {
    "path": "examples/client/overlay/app.js",
    "chars": 1254,
    "preview": "\"use strict\";\n\nconst createButton = require(\"./create-button\");\n\n/**\n * @param {string} errorMessage\n */\nfunction unsafe"
  },
  {
    "path": "examples/client/overlay/create-button.js",
    "chars": 312,
    "preview": "\"use strict\";\n\n/**\n * @param {string} label\n * @param {() => void} onClick\n * @returns HTMLButtonElement\n */\nmodule.expo"
  },
  {
    "path": "examples/client/overlay/webpack.config.js",
    "chars": 926,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/progress/README.md",
    "chars": 706,
    "preview": "# client.progress Option\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n  devServer: {\n    client: {\n      pr"
  },
  {
    "path": "examples/client/progress/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/client/progress/webpack.config.js",
    "chars": 289,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/reconnect/false/README.md",
    "chars": 813,
    "preview": "# client.reconnect: false\n\n## false\n\nTells dev-server the number of times it should try to reconnect the client. When `f"
  },
  {
    "path": "examples/client/reconnect/false/app.js",
    "chars": 251,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML =\n  \"Su"
  },
  {
    "path": "examples/client/reconnect/false/webpack.config.js",
    "chars": 294,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/reconnect/number/README.md",
    "chars": 1179,
    "preview": "# client.reconnect Option\n\n## number\n\nTells dev-server the number of times it should try to reconnect the client.\n\n**web"
  },
  {
    "path": "examples/client/reconnect/number/app.js",
    "chars": 251,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML =\n  \"Su"
  },
  {
    "path": "examples/client/reconnect/number/webpack.config.js",
    "chars": 290,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/reconnect/true/README.md",
    "chars": 1417,
    "preview": "# client.reconnect: true\n\n## true\n\nTells dev-server the number of times it should try to reconnect the client. When `tru"
  },
  {
    "path": "examples/client/reconnect/true/app.js",
    "chars": 251,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML =\n  \"Su"
  },
  {
    "path": "examples/client/reconnect/true/webpack.config.js",
    "chars": 293,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/client/trusted-types-overlay/README.md",
    "chars": 932,
    "preview": "# client.overlay.trustedTypesPolicyName option\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n  output: {\n   "
  },
  {
    "path": "examples/client/trusted-types-overlay/app.js",
    "chars": 171,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.textContent = \"Su"
  },
  {
    "path": "examples/client/trusted-types-overlay/layout.html",
    "chars": 1099,
    "preview": "<!-- Originally copied from \"../../.assets/layout.html\" -->\n<!doctype html>\n<html>\n  <head>\n    <!-- Enable Trusted Type"
  },
  {
    "path": "examples/client/trusted-types-overlay/webpack.config.js",
    "chars": 875,
    "preview": "\"use strict\";\n\nconst path = require(\"node:path\");\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\n// our setup"
  },
  {
    "path": "examples/client/web-socket-url/README.md",
    "chars": 1092,
    "preview": "# Web Socket URL Option Protocol\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n  devServer: {\n    host: \"0.0"
  },
  {
    "path": "examples/client/web-socket-url/app.js",
    "chars": 218,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.innerHTML =\n  \"Please check the ws request in d"
  },
  {
    "path": "examples/client/web-socket-url/index.html",
    "chars": 143,
    "preview": "<!doctype html>\n<html>\n  <head>\n    <script src=\"bundle.js\" type=\"text/javascript\" charset=\"utf-8\"></script>\n  </head>\n "
  },
  {
    "path": "examples/client/web-socket-url/webpack.config.js",
    "chars": 356,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/compression/false/README.md",
    "chars": 1095,
    "preview": "# Gzip Compression\n\nWebsite gzip compression makes it possible to reduce the file size of a file\nto roughly 30% of its o"
  },
  {
    "path": "examples/compression/false/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/compression/false/webpack.config.js",
    "chars": 267,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/compression/true/README.md",
    "chars": 1038,
    "preview": "# Gzip Compression\n\nWebsite gzip compression makes it possible to reduce the file size of a file\nto roughly 30% of its o"
  },
  {
    "path": "examples/compression/true/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/compression/true/webpack.config.js",
    "chars": 266,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/default/README.md",
    "chars": 838,
    "preview": "# Default State\n\nThis example demonstrates how to use `webpack-dev-server`.\n\n```console\nnpx webpack serve --open\n```\n\nTo"
  },
  {
    "path": "examples/default/app.js",
    "chars": 430,
    "preview": "\"use strict\";\n\nrequire(\"./style.less\");\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\")"
  },
  {
    "path": "examples/default/style.less",
    "chars": 40,
    "preview": "body {\n  background: url(pixels.png);\n}\n"
  },
  {
    "path": "examples/default/webpack.config.js",
    "chars": 546,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/dev-middleware/README.md",
    "chars": 1129,
    "preview": "# devMiddleware option\n\nProvide options to [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) w"
  },
  {
    "path": "examples/dev-middleware/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/dev-middleware/webpack.config.js",
    "chars": 351,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/config-array/README.md",
    "chars": 440,
    "preview": "# General: Webpack Config Array\n\nThis example demonstrates using a `webpack` config containing an array of configs.\n\n```"
  },
  {
    "path": "examples/general/config-array/app.js",
    "chars": 302,
    "preview": "\"use strict\";\n\nrequire(\"./style.less\");\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\")"
  },
  {
    "path": "examples/general/config-array/style.less",
    "chars": 40,
    "preview": "body {\n  background: url(pixels.png);\n}\n"
  },
  {
    "path": "examples/general/config-array/webpack.config.js",
    "chars": 1088,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/config-promise/README.md",
    "chars": 358,
    "preview": "# General: Promise-Based Webpack Config\n\nThis example demonstrates using `webpack-dev-server` with a `webpack` config th"
  },
  {
    "path": "examples/general/config-promise/app.js",
    "chars": 196,
    "preview": "\"use strict\";\n\n// Change the following line and save to see the compilation status\n\nconst target = document.querySelecto"
  },
  {
    "path": "examples/general/config-promise/index.html",
    "chars": 226,
    "preview": "<!doctype html>\n<html>\n  <head>\n    <title>Promise Config Example</title>\n    <script src=\"/bundle.js\" type=\"text/javasc"
  },
  {
    "path": "examples/general/config-promise/webpack.config.js",
    "chars": 310,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/proxy-advanced/README.md",
    "chars": 716,
    "preview": "# General: Proxy Advanced\n\nThis example demonstrates a user case whereby the app proxies all urls that start with `/api`"
  },
  {
    "path": "examples/general/proxy-advanced/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/general/proxy-advanced/bypass.html",
    "chars": 108,
    "preview": "<!doctype html>\n<html>\n  <body>\n    <h1>Example: proxy advanced</h1>\n\n    Bypassed proxy!\n  </body>\n</html>\n"
  },
  {
    "path": "examples/general/proxy-advanced/webpack.config.js",
    "chars": 553,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/proxy-hot-reload/README.md",
    "chars": 904,
    "preview": "# General: Proxy Hot Reload\n\n```shell\nnpx webpack serve --open\n```\n\nEnables hot reloading for proxy config. If function "
  },
  {
    "path": "examples/general/proxy-hot-reload/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/general/proxy-hot-reload/proxy-config.js",
    "chars": 270,
    "preview": "\"use strict\";\n\n/**/\nmodule.exports = {\n  target: \"http://jsonplaceholder.typicode.com/\",\n  pathRewrite: {\n    \"^/api\": \""
  },
  {
    "path": "examples/general/proxy-hot-reload/webpack.config.js",
    "chars": 1041,
    "preview": "\"use strict\";\n\nconst fs = require(\"node:fs\");\n// our setup function adds behind-the-scenes bits to the config that all o"
  },
  {
    "path": "examples/general/proxy-simple/README.md",
    "chars": 682,
    "preview": "# General: Simple Proxy\n\n```console\nnpx webpack serve --open\n```\n\nIn `webpack.config.js` there is a very simple configur"
  },
  {
    "path": "examples/general/proxy-simple/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/general/proxy-simple/webpack.config.js",
    "chars": 306,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/universal-config/README.md",
    "chars": 386,
    "preview": "# General: Webpack Universal Config\n\nThis example demonstrates using a `webpack` config containing a `target: web` confi"
  },
  {
    "path": "examples/general/universal-config/client.js",
    "chars": 665,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\nif (!globalThis.fetch) {\n  target.classList.add(\"fail\""
  },
  {
    "path": "examples/general/universal-config/server.js",
    "chars": 57,
    "preview": "\"use strict\";\n\nconsole.log(\"webpack-dev-server/server\");\n"
  },
  {
    "path": "examples/general/universal-config/webpack.config.js",
    "chars": 391,
    "preview": "\"use strict\";\n\nconst { setup } = require(\"../../util\");\n\nmodule.exports = [\n  setup({\n    mode: \"development\",\n    entry"
  },
  {
    "path": "examples/general/webworker/README.md",
    "chars": 440,
    "preview": "# General: WebWorker\n\nThis example demonstrates using a WebWorker within an app run by `webpack-dev-server`.\n\n```console"
  },
  {
    "path": "examples/general/webworker/web.js",
    "chars": 201,
    "preview": "\"use strict\";\n\n/* eslint-env browser */\n\nconst worker = new Worker(\"worker.bundle.js\");\nworker.onmessage = function onMe"
  },
  {
    "path": "examples/general/webworker/webpack.config.js",
    "chars": 428,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/general/webworker/worker.js",
    "chars": 163,
    "preview": "\"use strict\";\n\n/* eslint-env worker */\n\nglobalThis.onmessage = function onMessage(e) {\n  console.log(\"[WORKER]\", e);\n  s"
  },
  {
    "path": "examples/headers/array/README.md",
    "chars": 704,
    "preview": "# headers option as an object\n\nAdds headers to all responses.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n"
  },
  {
    "path": "examples/headers/array/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/headers/array/webpack.config.js",
    "chars": 396,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/headers/function/README.md",
    "chars": 661,
    "preview": "# headers option as a function\n\nAdds headers to all responses.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ..."
  },
  {
    "path": "examples/headers/function/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/headers/function/webpack.config.js",
    "chars": 322,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/headers/object/README.md",
    "chars": 595,
    "preview": "# headers option as an object\n\nAdds headers to all responses.\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n"
  },
  {
    "path": "examples/headers/object/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/headers/object/webpack.config.js",
    "chars": 300,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/history-api-fallback/README.md",
    "chars": 1586,
    "preview": "# historyApiFallback Option\n\nThis option enables [History API Fallback](https://github.com/bripkens/connect-history-api-"
  },
  {
    "path": "examples/history-api-fallback/app.js",
    "chars": 1901,
    "preview": "\"use strict\";\n\nconst path = document.location.pathname;\nconst target = document.querySelector(\"#target\");\nconst style = "
  },
  {
    "path": "examples/history-api-fallback/file.txt",
    "chars": 5,
    "preview": "file\n"
  },
  {
    "path": "examples/history-api-fallback/webpack.config.js",
    "chars": 273,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/hmr/boolean/README.md",
    "chars": 1595,
    "preview": "# Hot Module Reloading\n\nHot Module Replacement (HMR) exchanges, adds, or removes modules while an application is running"
  },
  {
    "path": "examples/hmr/boolean/app.js",
    "chars": 170,
    "preview": "\"use strict\";\n\nrequire(\"./example\");\n\nif (module.hot) {\n  module.hot.accept((err) => {\n    if (err) {\n      console.erro"
  },
  {
    "path": "examples/hmr/boolean/example.js",
    "chars": 195,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.innerHTML =\n  \"Modify and save <code>/examples/"
  },
  {
    "path": "examples/hmr/boolean/webpack.config.js",
    "chars": 261,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/hmr/only/README.md",
    "chars": 1065,
    "preview": "# Hot Module Reloading\n\nHot Module Replacement (HMR) exchanges, adds, or removes modules while an application is running"
  },
  {
    "path": "examples/hmr/only/app.js",
    "chars": 170,
    "preview": "\"use strict\";\n\nrequire(\"./example\");\n\nif (module.hot) {\n  module.hot.accept((err) => {\n    if (err) {\n      console.erro"
  },
  {
    "path": "examples/hmr/only/example.js",
    "chars": 195,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.innerHTML =\n  \"Modify and save <code>/examples/"
  },
  {
    "path": "examples/hmr/only/webpack.config.js",
    "chars": 263,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/host-and-port/README.md",
    "chars": 2984,
    "preview": "# Host and Port Options\n\nYou may choose to wish to change the host and port on which `webpack-dev-server`\nwill run. The "
  },
  {
    "path": "examples/host-and-port/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/host-and-port/webpack.config.js",
    "chars": 223,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/ipc/README.md",
    "chars": 867,
    "preview": "# IPC\n\nThe Unix socket to listen to (instead of a [host](../host-and-port/README.md)).\n\n## true\n\nSetting it to `true` wi"
  },
  {
    "path": "examples/ipc/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/ipc/webpack.config.js",
    "chars": 964,
    "preview": "\"use strict\";\n\nconst http = require(\"node:http\");\nconst httpProxy = require(\"http-proxy\");\n// our setup function adds be"
  },
  {
    "path": "examples/multi-compiler/README.md",
    "chars": 475,
    "preview": "# Multi Compiler\n\n`webpack-dev-server` should be able to compile multiple webpack configs.\n\n```shell\nnpx webpack serve -"
  },
  {
    "path": "examples/multi-compiler/app.js",
    "chars": 189,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/multi-compiler/webpack.config.js",
    "chars": 236,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/node-false/README.md",
    "chars": 238,
    "preview": "# Webpack `node` Option\n\n```console\nnpx webpack serve --open\n```\n\n## What should happen\n\n1. The script should open `http"
  },
  {
    "path": "examples/node-false/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/node-false/webpack.config.js",
    "chars": 238,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/on-listening/README.md",
    "chars": 705,
    "preview": "# onListening\n\nProvides the ability to execute a custom function when webpack-dev-server starts listening for connection"
  },
  {
    "path": "examples/on-listening/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/on-listening/webpack.config.js",
    "chars": 382,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst { "
  },
  {
    "path": "examples/open-target/README.md",
    "chars": 1430,
    "preview": "# Open Target Option\n\n## Open default generated URL in browser:\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // .."
  },
  {
    "path": "examples/open-target/app.js",
    "chars": 289,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\nif (globalThis.location.href.endsWith(\"example.html#pa"
  },
  {
    "path": "examples/open-target/webpack.config.js",
    "chars": 447,
    "preview": "\"use strict\";\n\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\n// our setup function adds behind-the-scenes bi"
  },
  {
    "path": "examples/open-target-multiple/README.md",
    "chars": 731,
    "preview": "# Open Target Option (Multiple)\n\n**webpack.config.js**\n\n```js\nmodule.exports = {\n  // ...\n  devServer: {\n    open: {\n   "
  },
  {
    "path": "examples/open-target-multiple/app1.js",
    "chars": 284,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\nif (globalThis.location.href.endsWith(\"example1.html\")"
  },
  {
    "path": "examples/open-target-multiple/app2.js",
    "chars": 284,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\nif (globalThis.location.href.endsWith(\"example2.html\")"
  },
  {
    "path": "examples/open-target-multiple/webpack.config.js",
    "chars": 857,
    "preview": "\"use strict\";\n\nconst HtmlWebpackPlugin = require(\"html-webpack-plugin\");\n// our setup function adds behind-the-scenes bi"
  },
  {
    "path": "examples/proxy/README.md",
    "chars": 797,
    "preview": "# proxy\n\nProxying some URLs can be useful when you have a separate API backend development server and you want to send A"
  },
  {
    "path": "examples/proxy/app.js",
    "chars": 165,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/proxy/webpack.config.js",
    "chars": 717,
    "preview": "\"use strict\";\n\nconst express = require(\"express\");\n// our setup function adds behind-the-scenes bits to the config that "
  },
  {
    "path": "examples/server/http2/README.md",
    "chars": 383,
    "preview": "# HTTP2 server\n\n**webpack.config.js**\n\n```js\nconst connect = require(\"connect\");\n\nmodule.exports = {\n  // ...\n  devServe"
  },
  {
    "path": "examples/server/http2/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/server/http2/webpack.config.js",
    "chars": 368,
    "preview": "\"use strict\";\n\n// our setup function adds behind-the-scenes bits to the config that all of our\n// examples need\nconst co"
  },
  {
    "path": "examples/server/https/README.md",
    "chars": 1895,
    "preview": "# HTTPS server\n\nYou may choose to run `webpack-dev-server` on `https`.\n\nCustomize `server.options` configuration with th"
  },
  {
    "path": "examples/server/https/app.js",
    "chars": 127,
    "preview": "\"use strict\";\n\nconst target = document.querySelector(\"#target\");\n\ntarget.classList.add(\"pass\");\ntarget.innerHTML = \"Succ"
  },
  {
    "path": "examples/server/https/ssl/ca.pem",
    "chars": 1679,
    "preview": "-----BEGIN RSA PRIVATE KEY-----\nMIIEpQIBAAKCAQEAxAUVLFM+K3XDLQkBi7xt0s1Ip7JoHYDskzUDQNHjjMkUq5kv\nC/hf5Ei1J6qruJs3Xqg86Nl"
  },
  {
    "path": "examples/server/https/ssl/server.crt",
    "chars": 1229,
    "preview": "-----BEGIN CERTIFICATE-----\nMIIDXTCCAkWgAwIBAgIJALz8gD/gAt0OMA0GCSqGSIb3DQEBCwUAMEUxCzAJBgNV\nBAYTAkFVMRMwEQYDVQQIDApTb21"
  }
]

// ... and 319 more files (download for full content)

About this extraction

This page contains the full source code of the webpack/webpack-dev-server GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 519 files (1.7 MB), approximately 459.7k tokens, and a symbol index with 235 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!