Skip to content

Commit 28b4972

Browse files
committed
replace chunk.hasRuntime with chunk.parents.length === 0
see https://github.com/webpack/webpack/pull/4310\#discussion_r102400692
1 parent 59ea80f commit 28b4972

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

lib/optimize/CommonsChunkPlugin.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ Take a look at the "name"/"names" or async/children option.`);
244244
return allChunks.filter((chunk) => {
245245
const found = targetChunks.indexOf(chunk);
246246
if(found >= currentIndex) return false;
247-
return chunk.hasRuntime();
247+
return chunk.parents.length === 0;
248248
});
249249
}
250250

0 commit comments

Comments
 (0)