This repository was archived by the owner on Oct 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,18 @@ let rendererConfig = {
129129 new HtmlWebpackPlugin ( {
130130 filename : 'index.html' ,
131131 template : path . resolve ( __dirname , '../src/index.ejs' ) ,
132+ templateParameters ( compilation , assets , options ) {
133+ return {
134+ compilation : compilation ,
135+ webpack : compilation . getStats ( ) . toJson ( ) ,
136+ webpackConfig : compilation . options ,
137+ htmlWebpackPlugin : {
138+ files : assets ,
139+ options : options ,
140+ } ,
141+ process,
142+ } ;
143+ } ,
132144 minify : {
133145 collapseWhitespace : true ,
134146 removeAttributeQuotes : true ,
Original file line number Diff line number Diff line change @@ -101,6 +101,18 @@ let webConfig = {
101101 new HtmlWebpackPlugin ( {
102102 filename : 'index.html' ,
103103 template : path . resolve ( __dirname , '../src/index.ejs' ) ,
104+ templateParameters ( compilation , assets , options ) {
105+ return {
106+ compilation : compilation ,
107+ webpack : compilation . getStats ( ) . toJson ( ) ,
108+ webpackConfig : compilation . options ,
109+ htmlWebpackPlugin : {
110+ files : assets ,
111+ options : options ,
112+ } ,
113+ process,
114+ } ;
115+ } ,
104116 minify : {
105117 collapseWhitespace : true ,
106118 removeAttributeQuotes : true ,
You can’t perform that action at this time.
0 commit comments