From 5305da7b15ec8294640157809e3949b5a02cc1dd Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Mon, 23 Nov 2015 11:48:28 +0100 Subject: [PATCH] Port "Don't insert chunks that is not 'initial'" --- index.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/index.js b/index.js index 2bd4c68..22e2f64 100644 --- a/index.js +++ b/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;