Skip to content

Commit

Permalink
Merge pull request #7063 from webpack/bugfix/clone-optimization
Browse files Browse the repository at this point in the history
Clone optimization config in Defaulter
  • Loading branch information
sokra committed Apr 17, 2018
2 parents 3a5fda9 + c47150c commit 941be29
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 941be29

Please sign in to comment.