# @types/webpack-hot-middleware

> TypeScript definitions for webpack-hot-middleware

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

## Install

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

## Health

**Score 55/100 (C)** — status: stable.

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

Warnings: low downloads; no esm support.

Negative: stale.

## Facts

| | |
|---|---|
| Version | 2.25.12 |
| Published | 2025-10-24 |
| First published | 2017-01-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 6 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 51469 |
| Maintainers | types |

## Links

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

## Dependencies (3)

- [tapable](https://npm.io/package/tapable.md) ^2.2.0
- [webpack](https://npm.io/package/webpack.md) ^5
- [@types/connect](https://npm.io/package/@types/connect.md) *

## Recent versions

- 2.25.12 (latest) — 2025-10-24
- 2.25.9 (ts4.9) — 2023-11-07
- 2.25.6 (ts4.2) — 2022-02-14
- 2.25.5 (ts3.7) — 2021-07-02
- 2.25.3 (ts3.6) — 2020-05-15
- 2.25.2 (ts2.8) — 2020-04-17
- 2.16.5 (ts2.5) — 2019-02-14
- 2.16.2 (ts2.2) — 2017-11-15
- 2.16.0 (ts2.0) — 2017-09-07
- 2.25.11 — 2025-10-06
- 2.25.10 — 2025-08-10
- 2.25.8 — 2023-10-18
- 2.25.7 — 2023-09-25
- 2.25.4 — 2021-03-25
- 2.25.1 — 2020-04-11
- … 5 more at https://npm.io/package/@types/webpack-hot-middleware/versions

## README

# Installation
> `npm install --save @types/webpack-hot-middleware`

# Summary
This package contains type definitions for webpack-hot-middleware (https://github.com/webpack-contrib/webpack-hot-middleware).

# Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-middleware.
## [index.d.ts](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/webpack-hot-middleware/index.d.ts)
````ts
import { NextHandleFunction } from "connect";
import webpack = require("webpack");

export = WebpackHotMiddleware;

declare function WebpackHotMiddleware(
    compiler: webpack.Compiler | webpack.MultiCompiler,
    options?: WebpackHotMiddleware.MiddlewareOptions,
): NextHandleFunction & WebpackHotMiddleware.EventStream;

declare namespace WebpackHotMiddleware {
    interface ClientOptions {
        path?: string | undefined;
        reload?: boolean | undefined;
        name?: string | undefined;
        timeout?: number | undefined;
        overlay?: boolean | undefined;
        noInfo?: boolean | undefined;
        quiet?: boolean | undefined;
        dynamicPublicPath?: boolean | undefined;
        autoConnect?: boolean | undefined;
        ansiColors?: {
            [key: string]: any;
        } | undefined;
        overlayStyles?: {
            [key: string]: any;
        } | undefined;
        overlayWarnings?: boolean | undefined;
    }
    interface MiddlewareOptions {
        log?: false | Logger | undefined;
        path?: string | undefined;
        heartbeat?: number | undefined;
        statsOptions?: webpack.StatsOptions;
    }

    type Logger = (message?: any, ...optionalParams: any[]) => void;

    interface EventStream {
        publish(payload: any): void;
        close(): void;
    }
}

````

### Additional Details
 * Last updated: Fri, 24 Oct 2025 04:02:41 GMT
 * Dependencies: [@types/connect](https://npmjs.com/package/@types/connect), [tapable](https://npmjs.com/package/tapable), [webpack](https://npmjs.com/package/webpack)

# Credits
These definitions were written by [Benjamin Lim](https://github.com/bumbleblym), [Ron Martinez](https://github.com/icylace), [Chris Abrams](https://github.com/chrisabrams), and [Rodrigo Saboya](https://github.com/saboya).

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