Skip to content

Commit

Permalink
Clone optimization config in Defaulter
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Apr 17, 2018
1 parent ec4ec8e commit c47150c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/WebpackOptionsDefaulter.js
Expand Up @@ -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);
Expand Down
4 changes: 4 additions & 0 deletions test/cases/chunks/runtime/test.filter.js
@@ -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";
};

0 comments on commit c47150c

Please sign in to comment.