Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve minChunkSize algorithm (#4723)
* Slightly simplify graph analysis Also generates dynamicImportsByEntry that will help us to track already loaded modules more efficiently. * Try to merge small side effect chunks first * Used cached hasEffects to improve performance * Add comment explaining chunk merge strategy * Add test for cycle prevention We probably need complete transitive dependency maps to continue here * Avoid cycles when merging chunks * Avoid cycles when merging chunks * Log cycles in generated chunks * Improve cycle prevention mechanism * Hopefully fix the algorithm for good * Add logging * Use a much more basic algorithm * Remove logging * Improve coverage
- Loading branch information
1 parent
52ba95c
commit 0a5ea57
Showing
63 changed files
with
621 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 9 additions & 0 deletions
9
test/chunking-form/samples/minChunkSize/avoid-circular-dependencies/_config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
module.exports = { | ||
description: 'avoids circular dependencies when merging chunks', | ||
options: { | ||
input: ['main1.js', 'main2.js', 'main3.js'], | ||
output: { | ||
experimentalMinChunkSize: 100 | ||
} | ||
} | ||
}; |
Oops, something went wrong.