From 8ed2159b9d935b116f425de6cd074ed0a7db01c1 Mon Sep 17 00:00:00 2001 From: Jan Nicklas Date: Fri, 11 Nov 2016 09:52:41 +0100 Subject: [PATCH] Improve readability --- index.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/index.js b/index.js index 51d0445..6ad22b7 100644 --- a/index.js +++ b/index.js @@ -65,7 +65,9 @@ HtmlWebpackPlugin.prototype.apply = function (compiler) { compiler.plugin('emit', function (compilation, callback) { var applyPluginsAsyncWaterfall = self.applyPluginsAsyncWaterfall(compilation); // Get all chunks - var chunks = self.filterChunks(compilation.getStats().toJson(), self.options.chunks, self.options.excludeChunks); + var allChunks = compilation.getStats().toJson(); + // Filter chunks (options.chunks and options.excludeCHunks) + var chunks = self.filterChunks(allChunks, self.options.chunks, self.options.excludeChunks); // Sort chunks chunks = self.sortChunks(chunks, self.options.chunksSortMode); // Let plugins alter the chunks and the chunk sorting