Skip to content

Commit 0dc1a47

Browse files
committed
chore: update webpack-dev-middleware to v8 and document breaking changes
1 parent 6e20016 commit 0dc1a47

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
"webpack-dev-server": minor
2+
"webpack-dev-server": major
33
---
44

5-
Update `webpack-dev-middleware` to v8 and sync `originalUrl` for middleware compatibility.
5+
Update `webpack-dev-middleware` to v8 and sync `originalUrl` for middleware compatibility. `server.middleware.getFilenameFromUrl()` is now asynchronous and resolves to `{ filename, extra: { stats, outputFileSystem } }`. See the [webpack-dev-middleware v8 release notes](https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.0.0) for details.

migration-v6.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ This document serves as a migration guide for `webpack-dev-server@6.0.0`.
77
- Minimum supported `Node.js` version is `22.15.0`.
88
- Minimum supported `webpack` version is `5.101.0`.
99
- The package is now published as **ESM-only**. Prefer `import` syntax. CommonJS consumers can still load it via [`require(esm)`](https://nodejs.org/api/modules.html#loading-ecmascript-modules-using-require), which is enabled by default in the supported Node.js versions (>= 22.15.0).
10+
- `webpack-dev-middleware` has been upgraded to **v8**. The most notable change for consumers is that `server.middleware.getFilenameFromUrl()` is now asynchronous and resolves to an object `{ filename, extra: { stats, outputFileSystem } }` instead of returning the filename synchronously. See the [webpack-dev-middleware v8 release notes](https://github.com/webpack/webpack-dev-middleware/releases/tag/v8.0.0) for the full list of changes.
1011
- The bundled Express has been upgraded to **v5**. This affects `setupMiddlewares`, the `app` option, and any custom middleware integration. Notably: path matching no longer supports the bare `*` wildcard (use `*splat` or named parameters), `req.query` is no longer mutable, and rejected promises in middleware are now forwarded to error handlers automatically. See the [Express 5 migration guide](https://expressjs.com/en/guide/migrating-5) for the full list of breaking changes.
1112
- Support for **SockJS** in the WebSocket transport has been removed. Now, only **native WebSocket** is supported, or **custom** client and server implementations can be used.
1213
- The options for passing to the `proxy` have changed. Please refer to the [http-proxy-middleware migration guide](https://github.com/chimurai/http-proxy-middleware/blob/master/MIGRATION.md) for details.

0 commit comments

Comments
 (0)