Skip to content

Commit

Permalink
do not incorporate chunks without modules
Browse files Browse the repository at this point in the history
  • Loading branch information
timse committed Mar 18, 2017
1 parent 416e5be commit d7ae9ad
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/optimize/FlagIncludedChunksPlugin.js
Expand Up @@ -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;
Expand Down

0 comments on commit d7ae9ad

Please sign in to comment.