Skip to content

Commit 59ea80f

Browse files
committed
remove chunk.isInitial constraint before moving blocks
1 parent e1ea0a7 commit 59ea80f

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

lib/optimize/CommonsChunkPlugin.js

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -339,13 +339,9 @@ Take a look at the "name"/"names" or async/children option.`);
339339

340340
moveExtractedChunkBlocksToTargetChunk(chunks, targetChunk) {
341341
for(let chunk of chunks) {
342-
// only for non initial chunks
343-
// TODO: why?
344-
if(!chunk.isInitial()) {
345-
for(let block of chunk.blocks) {
346-
block.chunks.unshift(targetChunk);
347-
targetChunk.addBlock(block);
348-
}
342+
for(let block of chunk.blocks) {
343+
block.chunks.unshift(targetChunk);
344+
targetChunk.addBlock(block);
349345
}
350346
}
351347
}

0 commit comments

Comments
 (0)