File tree Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Expand file tree Collapse file tree 1 file changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -198,15 +198,15 @@ class HtmlWebpackChildCompiler {
198
198
childCompilation . errors &&
199
199
childCompilation . errors . length
200
200
) {
201
- const errorDetails = childCompilation . errors
202
- . map ( ( error ) => {
203
- let message = error . message ;
204
- if ( error . stack ) {
205
- message += "\n" + error . stack ;
206
- }
207
- return message ;
208
- } )
209
- . join ( "\n" ) ;
201
+ const errorDetailsArray = [ ] ;
202
+ for ( const error of childCompilation . errors ) {
203
+ let message = error . message ;
204
+ if ( error . stack ) {
205
+ message += "\n" + error . stack ;
206
+ }
207
+ errorDetailsArray . push ( message ) ;
208
+ }
209
+ const errorDetails = errorDetailsArray . join ( "\n" ) ;
210
210
211
211
reject ( new Error ( "Child compilation failed:\n" + errorDetails ) ) ;
212
212
You can’t perform that action at this time.
0 commit comments