File tree 1 file changed +18
-2
lines changed
1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -84,8 +84,24 @@ class HtmlWebpackPlugin {
84
84
85
85
compiler . plugin ( 'emit' , ( compilation , callback ) => {
86
86
const applyPluginsAsyncWaterfall = self . applyPluginsAsyncWaterfall ( compilation ) ;
87
- // Get all chunks
88
- const allChunks = compilation . getStats ( ) . toJson ( ) . chunks ;
87
+ // Get chunks info as json
88
+ // Note: we're excluding stuff that we don't need to improve toJson serialization speed.
89
+ const chunkOnlyConfig = {
90
+ assets : false ,
91
+ cached : false ,
92
+ children : false ,
93
+ chunks : true ,
94
+ chunkModules : false ,
95
+ chunkOrigins : false ,
96
+ errorDetails : false ,
97
+ hash : false ,
98
+ modules : false ,
99
+ reasons : false ,
100
+ source : false ,
101
+ timings : false ,
102
+ version : false
103
+ } ;
104
+ const allChunks = compilation . getStats ( ) . toJson ( chunkOnlyConfig ) . chunks ;
89
105
// Filter chunks (options.chunks and options.excludeCHunks)
90
106
let chunks = self . filterChunks ( allChunks , self . options . chunks , self . options . excludeChunks ) ;
91
107
// Sort chunks
You can’t perform that action at this time.
0 commit comments