replace `chunk.hasRuntime` with `chunk.parents.length === 0`

see https://github.com/webpack/webpack/pull/4310\#discussion_r102400692
This commit is contained in:
Tim Sebastian 2017-02-22 21:38:45 +11:00
parent 59ea80ff9a
commit 28b4972d53
1 changed files with 1 additions and 1 deletions

View File

@ -244,7 +244,7 @@ Take a look at the "name"/"names" or async/children option.`);
return allChunks.filter((chunk) => {
const found = targetChunks.indexOf(chunk);
if(found >= currentIndex) return false;
return chunk.hasRuntime();
return chunk.parents.length === 0;
});
}