Skip to content

Commit

Permalink
Merge pull request #9472 from webpack/performance/chunk-group-available
Browse files Browse the repository at this point in the history
Optimize performance of chunk graph generation
  • Loading branch information
sokra committed Jul 26, 2019
2 parents 2686baf + 81017d5 commit 9741565
Show file tree
Hide file tree
Showing 6 changed files with 717 additions and 471 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 9741565

Please sign in to comment.