diff --git a/.changeset/write-to-disk-output-clean.md b/.changeset/write-to-disk-output-clean.md deleted file mode 100644 index 019e39a0d..000000000 --- a/.changeset/write-to-disk-output-clean.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"webpack-dev-middleware": patch ---- - -Clean the files `writeToDisk` writes when `output.clean` is set. webpack wrote the build to memory and cleaned only that, so the copies on disk were never cleaned: the previous session's files stayed, and every rebuild left another `main.[contenthash].js` behind. The middleware now gives webpack a file system that writes to memory and, for the files `writeToDisk` takes, to disk, and that removes and lists files on both, so `output.clean` cleans the disk too, honoring `clean.keep` and `clean.dry`, in plugin mode as in standalone mode, with every webpack 5 version and with Rspack. `writeToDisk: true` with a file system of your own, in `outputFileSystem` or on the compiler, now writes to disk too: it wrote nothing there before. diff --git a/CHANGELOG.md b/CHANGELOG.md index f7f528990..5159edb2c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +## 8.6.3 + +### Patch Changes + +- Clean the files `writeToDisk` writes when `output.clean` is set. webpack wrote the build to memory and cleaned only that, so the copies on disk were never cleaned: the previous session's files stayed, and every rebuild left another `main.[contenthash].js` behind. The middleware now gives webpack a file system that writes to memory and, for the files `writeToDisk` takes, to disk, and that removes and lists files on both, so `output.clean` cleans the disk too, honoring `clean.keep` and `clean.dry`, in plugin mode as in standalone mode, with every webpack 5 version and with Rspack. `writeToDisk: true` with a file system of your own, in `outputFileSystem` or on the compiler, now writes to disk too: it wrote nothing there before. (by [@alexander-akait](https://github.com/alexander-akait) in [#2497](https://github.com/webpack/webpack-dev-middleware/pull/2497)) + ## 8.6.2 ### Patch Changes diff --git a/package.json b/package.json index b20ff8d4e..ca10d3780 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "webpack-dev-middleware", - "version": "8.6.2", + "version": "8.6.3", "description": "A development middleware for webpack", "keywords": [ "webpack",