mirror of https://github.com/webpack/webpack.git
Merge pull request #984 from faller/patch-1
fix length judgment in MinChunkSizePlugin
This commit is contained in:
commit
8d350b69a6
|
@ -29,8 +29,6 @@ MinChunkSizePlugin.prototype.apply = function(compiler) {
|
|||
return pair[0].size(equalOptions) < minChunkSize || pair[1].size(equalOptions) < minChunkSize;
|
||||
});
|
||||
|
||||
if(combinations.length === 0) return;
|
||||
|
||||
combinations.forEach(function(pair) {
|
||||
var a = pair[0].size(options);
|
||||
var b = pair[1].size(options);
|
||||
|
@ -41,6 +39,8 @@ MinChunkSizePlugin.prototype.apply = function(compiler) {
|
|||
combinations = combinations.filter(function(pair) {
|
||||
return pair[1] !== false;
|
||||
});
|
||||
|
||||
if(combinations.length === 0) return;
|
||||
|
||||
combinations.sort(function(a,b) {
|
||||
var diff = b[0] - a[0];
|
||||
|
|
Loading…
Reference in New Issue