npm webpack-dev-middleware 8.7.0
v8.7.0

one hour ago

Minor Changes

  • Inject the client into Web Workers the page starts, with webpack versions that provide the additionalEntries hook. (by @alexander-akait in #2518)

Patch Changes

  • Make hapiWrapper, koaWrapper and honoWrapper importable by name from an ES module, as import { koaWrapper } from "webpack-dev-middleware", which the types already allow. Node.js did not see them as named exports, so such an import threw a SyntaxError. (by @imssurya in #2527)

  • perf: serve requests with less repeated work. A compilation's public and output paths are templated once rather than on every request, a request that is not for the hot endpoint is told so without parsing its url, and hot keeps each build's payloads instead of its stats, formatting a build's problems once rather than again for every client that connects. (by @alexander-akait in #2526)

  • Start the hot client only in a page or a web worker, so a universal build runs quietly in Deno and Bun as it does in Node, instead of failing to connect there. Decide in each build which entry points need the client, from the entries the build really has, so an entry function, an alias and entries other plugins add are seen as they are, and a child compiler's compilation gets none. hot no longer throws with Rspack, which has no webpack.dependencies for the worker hook. (by @alexander-akait in #2520)

  • Hot-update the fix after a build error instead of reloading the page: an error thrown while applying an update now reloads only when no newer build waits to be applied. (by @alexander-akait in #2525)

Don't miss a new webpack-dev-middleware release

NewReleases is sending notifications on new releases.