Patch Changes
- Clean the files
writeToDiskwrites whenoutput.cleanis 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 anothermain.[contenthash].jsbehind. The middleware now gives webpack a file system that writes to memory and, for the fileswriteToDisktakes, to disk, and that removes and lists files on both, sooutput.cleancleans the disk too, honoringclean.keepandclean.dry, in plugin mode as in standalone mode, with every webpack 5 version and with Rspack.writeToDisk: truewith a file system of your own, inoutputFileSystemor on the compiler, now writes to disk too: it wrote nothing there before. (by @alexander-akait in #2497)