feat: refactoring project
This commit is contained in:
6
node_modules/webpack/lib/optimize/AggressiveMergingPlugin.js
generated
vendored
6
node_modules/webpack/lib/optimize/AggressiveMergingPlugin.js
generated
vendored
@@ -51,7 +51,7 @@ class AggressiveMergingPlugin {
|
||||
chunks => {
|
||||
const chunkGraph = compilation.chunkGraph;
|
||||
/** @type {{a: Chunk, b: Chunk, improvement: number}[]} */
|
||||
let combinations = [];
|
||||
const combinations = [];
|
||||
for (const a of chunks) {
|
||||
if (a.canBeInitial()) continue;
|
||||
for (const b of chunks) {
|
||||
@@ -78,9 +78,7 @@ class AggressiveMergingPlugin {
|
||||
}
|
||||
}
|
||||
|
||||
combinations.sort((a, b) => {
|
||||
return b.improvement - a.improvement;
|
||||
});
|
||||
combinations.sort((a, b) => b.improvement - a.improvement);
|
||||
|
||||
const pair = combinations[0];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user