Port "Don't insert chunks that is not 'initial'"
This commit is contained in:
parent
6f522b1998
commit
5305da7b15
4
index.js
4
index.js
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue