File tree Expand file tree Collapse file tree 4 files changed +13
-1
lines changed
Expand file tree Collapse file tree 4 files changed +13
-1
lines changed Original file line number Diff line number Diff line change 11Change History
22==============
33
4+ v2.19.0
5+ ----
6+ * Add ` html-webpack-plugin-alter-chunks ` event for custom chunk sorting and interpolation
7+
48v2.18.0
59----
610* Updated all dependencies
Original file line number Diff line number Diff line change @@ -244,11 +244,17 @@ Events
244244
245245To allow other [ plugins] ( https://github.com/webpack/docs/wiki/plugins ) to alter the html this plugin executes the following events:
246246
247+ Asnyc:
248+
247249 * ` html-webpack-plugin-before-html-generation `
248250 * ` html-webpack-plugin-before-html-processing `
249251 * ` html-webpack-plugin-after-html-processing `
250252 * ` html-webpack-plugin-after-emit `
251253
254+ Sync:
255+
256+ * ` html-webpack-plugin-alter-chunks `
257+
252258Example implementation: [ html-webpack-harddisk-plugin] ( https://github.com/jantimon/html-webpack-harddisk-plugin )
253259
254260Usage:
Original file line number Diff line number Diff line change @@ -68,6 +68,8 @@ HtmlWebpackPlugin.prototype.apply = function (compiler) {
6868 var chunks = self . filterChunks ( compilation . getStats ( ) . toJson ( ) , self . options . chunks , self . options . excludeChunks ) ;
6969 // Sort chunks
7070 chunks = self . sortChunks ( chunks , self . options . chunksSortMode ) ;
71+ // Let plugins alter the chunks and the chunk sorting
72+ chunks = compilation . applyPluginsWaterfall ( 'html-webpack-plugin-alter-chunks' , chunks , { plugin : self } ) ;
7173 // Get assets
7274 var assets = self . htmlWebpackPluginAssets ( compilation , chunks ) ;
7375 // If this is a hot update compilation, move on!
Original file line number Diff line number Diff line change 11{
22 "name" : " html-webpack-plugin" ,
3- "version" : " 2.18 .0" ,
3+ "version" : " 2.19 .0" ,
44 "description" : " Simplifies creation of HTML files to serve your webpack bundles" ,
55 "main" : " index.js" ,
66 "files" : [
You can’t perform that action at this time.
0 commit comments