From 10e8b5e0a49117945ae3822927ab79df747cfc65 Mon Sep 17 00:00:00 2001 From: Vasiliy Yorkin Date: Tue, 10 Nov 2015 21:24:51 +0300 Subject: [PATCH] Don't insert chunks that is not 'initial' --- index.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/index.js b/index.js index e10a79e..5030639 100644 --- a/index.js +++ b/index.js @@ -220,6 +220,11 @@ HtmlWebpackPlugin.prototype.htmlWebpackPluginAssets = function(compilation, webp continue; } + // Skip not initial chunks + if (!chunk.initial) { + continue; + } + // Skip if the chunks should be filtered and the given chunk was not added explicity if (Array.isArray(includedChunks) && includedChunks.indexOf(chunkName) === -1) { continue;