Skip to content

Commit

Permalink
move chunk graph building into separate file
Browse files Browse the repository at this point in the history
refactor chunk graph generation to include available modules optimization
  • Loading branch information
sokra committed Jul 26, 2019
1 parent 2686baf commit 126fb99
Show file tree
Hide file tree
Showing 4 changed files with 694 additions and 469 deletions.
6 changes: 5 additions & 1 deletion lib/Chunk.js
Expand Up @@ -355,7 +355,11 @@ class Chunk {
return this._modules.getFromUnorderedCache(getModulesIdent);
}

remove() {
/**
* @param {string=} reason reason why chunk is removed
* @returns {void}
*/
remove(reason) {
// cleanup modules
// Array.from is used here to create a clone, because removeChunk modifies this._modules
for (const module of Array.from(this._modules)) {
Expand Down
2 changes: 1 addition & 1 deletion lib/ChunkGroup.js
Expand Up @@ -345,7 +345,7 @@ class ChunkGroup {
}

/**
* @param {ModuleReason} reason reason for removing ChunkGroup
* @param {string=} reason reason for removing ChunkGroup
* @returns {void}
*/
remove(reason) {
Expand Down

0 comments on commit 126fb99

Please sign in to comment.