Clone optimization config in Defaulter

#6565
This commit is contained in:
Tobias Koppers 2018-04-17 11:39:25 +02:00
parent ec4ec8eec3
commit c47150c42c
2 changed files with 5 additions and 0 deletions

View File

@ -193,6 +193,7 @@ class WebpackOptionsDefaulter extends OptionsDefaulter {
options => (isProductionLikeMode(options) ? "warning" : false)
);
this.set("optimization", "call", value => Object.assign({}, value));
this.set("optimization.removeAvailableModules", true);
this.set("optimization.removeEmptyChunks", true);
this.set("optimization.mergeDuplicateChunks", true);

View File

@ -0,0 +1,4 @@
module.exports = function(config) {
// This test can't run in development mode as it depends on the flagIncludedChunks optimization
return config.mode !== "development";
};