Skip to content

Commit 39e4619

Browse files
committed
Setting CleanWebpackPlugin's cleanStaleWebpackAssets: false
There is currently a bug where, on a "watch" rebuild, sometimes an image that's referenced from a CSS file won't be "noticed" and will be mistakenly deleted.
1 parent b989e37 commit 39e4619

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/plugins/clean.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ module.exports = function(plugins, webpackConfig) {
2929

3030
const cleanWebpackPluginOptions = {
3131
verbose: false,
32-
cleanOnceBeforeBuildPatterns: webpackConfig.cleanWebpackPluginPaths
32+
cleanOnceBeforeBuildPatterns: webpackConfig.cleanWebpackPluginPaths,
33+
// disabled to avoid a bug where some files were incorrectly deleted on watch rebuild
34+
cleanStaleWebpackAssets: false
3335
};
3436

3537
plugins.push({

0 commit comments

Comments
 (0)