Skip to content

Commit

Permalink
fix bug where cacheGroup index was inverted
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Jan 7, 2021
1 parent 3f69f3c commit 4de8451
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/optimize/SplitChunksPlugin.js
Expand Up @@ -76,7 +76,7 @@ const compareEntries = (a, b) => {
const diffSizeReduce = aSizeReduce - bSizeReduce;
if (diffSizeReduce) return diffSizeReduce;
// 4. by cache group index
const indexDiff = a.cacheGroupIndex - b.cacheGroupIndex;
const indexDiff = b.cacheGroupIndex - a.cacheGroupIndex;
if (indexDiff) return indexDiff;
// 5. by number of modules (to be able to compare by identifier)
const modulesA = a.modules;
Expand Down

0 comments on commit 4de8451

Please sign in to comment.