Skip to content

Commit 15045d2

Browse files
committed
minCount default should not be 1 or lower
fixes webpack#368
1 parent d57921a commit 15045d2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎lib/optimize/CommonsChunkPlugin.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ CommonsChunkPlugin.prototype.apply = function(compiler) {
4646
});
4747
});
4848
commonModulesCount.forEach(function(count, idx) {
49-
if(count >= (minCount || usedChunks.length)) {
49+
if(count >= (minCount || Math.max(2, usedChunks.length))) {
5050
var module = commonModules[idx];
5151
usedChunks.forEach(function(chunk) {
5252
module.removeChunk(chunk);

0 commit comments

Comments
 (0)