Port "Don't insert chunks that is not 'initial'"

This commit is contained in:
Jan Nicklas 2015-11-23 11:48:28 +01:00 committed by Jan Nicklas
parent 6f522b1998
commit 5305da7b15
1 changed files with 4 additions and 0 deletions

View File

@ -300,6 +300,10 @@ HtmlWebpackPlugin.prototype.filterChunks = function (webpackStatsJson, includedC
if (chunkName === undefined) {
return false;
}
// Skip if the chunk should be lazy loaded
if (!chunk.initial) {
return false;
}
// Skip if the chunks should be filtered and the given chunk was not added explicity
if (Array.isArray(includedChunks) && includedChunks.indexOf(chunkName) === -1) {
return false;