Skip to content
Permalink
Browse files
Merge pull request #4504 from timse/do-not-merge-empty-chunks
Do not merge empty chunks
  • Loading branch information
sokra committed Mar 18, 2017
2 parents a9972a3 + d67e125 commit fadafb2c187ee86df7477fbcb51b5c06076d2172
@@ -19,6 +19,8 @@ class FlagIncludedChunksPlugin {
// as we loop twice the current A will be B and B then A
if(chunkA.modules.length < chunkB.modules.length) return;

if(chunkB.modules.length === 0) return;

// is chunkB in chunkA?
for(let i = 0; i < chunkB.modules.length; i++) {
if(chunkA.modules.indexOf(chunkB.modules[i]) < 0) return;
@@ -1,8 +1,8 @@
Hash: 9beb53e88067f8ed0026
Hash: dc6038bec87a57d1a45e
Time: Xms
Asset Size Chunks Chunk Names
entry-1.js 25 bytes 0 [emitted] entry-1
vendor-1.js 6.72 kB 1, 0 [emitted] vendor-1
vendor-1.js 6.7 kB 1 [emitted] vendor-1
chunk {0} entry-1.js (entry-1) 0 bytes {1} [initial] [rendered]
chunk {1} vendor-1.js (vendor-1) 329 bytes [entry] [rendered]
[0] (webpack)/test/statsCases/commons-chunk-min-size-0/modules/a.js 22 bytes {1} [built]

0 comments on commit fadafb2

Please sign in to comment.