# @types/webpack-hot-client

> TypeScript definitions for webpack-hot-client

Latest version **4.1.7** (published 2025-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install @types/webpack-hot-client
pnpm add @types/webpack-hot-client
yarn add @types/webpack-hot-client
bun add @types/webpack-hot-client
```

## Health

**Score 65/100 (B)** — status: stable.

Positive: has types; no vulnerabilities; high maintenance score; popular repo; extremely popular.

Warnings: low downloads; no esm support.

## Facts

| | |
|---|---|
| Version | 4.1.7 |
| Published | 2025-10-24 |
| First published | 2018-06-01 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 7.7 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51445 |
| Maintainers | types |

## Links

- npm: https://www.npmjs.com/package/@types/webpack-hot-client
- Repository: https://github.com/DefinitelyTyped/DefinitelyTyped
- Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-client
- npm.io page: https://npm.io/package/@types/webpack-hot-client

## Dependencies (3)

- [@types/ws](https://npm.io/package/@types/ws.md) *
- [@types/node](https://npm.io/package/@types/node.md) *
- [@types/webpack](https://npm.io/package/@types/webpack.md) ^4

## Recent versions

- 4.1.7 (latest) — 2025-10-24
- 4.1.6 (ts4.9) — 2023-11-07
- 4.1.3 (ts4.0) — 2021-12-24
- 4.1.2 (ts3.7) — 2021-07-02
- 4.1.0 (ts2.8) — 2020-02-25
- 4.0.0 (ts2.6) — 2018-06-22
- 4.1.5 — 2023-10-18
- 4.1.4 — 2023-09-25
- 4.1.1 — 2021-03-25
- 3.0.1 — 2018-06-06
- 3.0.0 — 2018-06-01

## README

# Installation
> `npm install --save @types/webpack-hot-client`

# Summary
This package contains type definitions for webpack-hot-client (https://github.com/webpack-contrib/webpack-hot-client).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-client.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-client/index.d.ts)
````ts
/// <reference types="node" />

import * as net from "net";
import webpack = require("webpack");
import { Server } from "ws";

export = WebpackHotClient;

declare function WebpackHotClient(
    compiler: webpack.Compiler | webpack.MultiCompiler,
    options: WebpackHotClient.Options,
): WebpackHotClient.Client;

declare namespace WebpackHotClient {
    interface WebSocketServer extends Server {
        /** Forwards a message to each open client on the WebSocketServer */
        broadcast(data: any): void;
        /** Processes stats and sends messages through broadcast() */
        send(stats: webpack.Stats): void;
    }

    interface Client {
        /** Function that closes the WebSocketServer opened by the module. */
        close(callback?: () => void): void;
        /** WebSocketServer instance with some hot-client specific method overrides */
        server: WebSocketServer;
        /** Readonly version of the options after applying defaults */
        options: Readonly<Options>;
    }

    interface WebpackHotHost {
        /** Client hostname that is used in the browser by WebSockets */
        client: string;
        /** Server hostname */
        server: string;
    }

    interface Options {
        /** Automatically configure every entry */
        allEntries?: boolean | undefined;
        /** Auto configure the given webpack config with the hot configuration */
        autoConfigure?: boolean | undefined;
        /** Host that the WebSocket listens on */
        host?: WebpackHotHost | string | undefined;
        /** Enable hot module reloading */
        hmr?: boolean | undefined;
        /** Enable HTTPS */
        https?: boolean | undefined;
        /** Level of information for webpack-hot-client to output */
        logLevel?: "trace" | "debug" | "info" | "warn" | "error" | "silent" | undefined;
        /** Prepend timestamp to each log line */
        logTime?: boolean | undefined;
        /** Port that the WebSocket listens on */
        port?: number | undefined;
        /** Reload the page if a patch cannot be applied by webpack */
        reload?: boolean | undefined;
        /** Server instance for webpack-hot-client to connect to */
        server?: net.Server | undefined;
        /** Webpack stats configuration */
        stats?: webpack.Options.Stats | undefined;
        /** Webpack compile target */
        validTargets?: string[] | undefined;
    }
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/node](https://npmjs.com/package/@types/node), [@types/webpack](https://npmjs.com/package/@types/webpack), [@types/ws](https://npmjs.com/package/@types/ws)

# Credits
These definitions were written by [ZSkycat](https://github.com/ZSkycat), and [Brian Armstrong](https://github.com/barm).

---
_Source: https://npm.io/package/@types/webpack-hot-client · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
