Skip to content

Commit d0beb30

Browse files
committed
check chunk condition before moving into commons chunk
1 parent 324d309 commit d0beb30

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎lib/optimize/CommonsChunkPlugin.js‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,8 @@ CommonsChunkPlugin.prototype.apply = function(compiler) {
123123
} else if(count < _minChunks) {
124124
return;
125125
}
126+
if(module.chunkCondition && !module.chunkCondition(commonChunk))
127+
return;
126128
reallyUsedModules.push(module);
127129
});
128130
}

0 commit comments

Comments
 (0)