We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
childCompilation.errors
1 parent ae85878 commit 25190a5Copy full SHA for 25190a5
lib/child-compiler.js
@@ -198,15 +198,15 @@ class HtmlWebpackChildCompiler {
198
childCompilation.errors &&
199
childCompilation.errors.length
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");
+ const errorDetailsArray = [];
+ for (const error of childCompilation.errors) {
+ let message = error.message;
+ if (error.stack) {
+ message += "\n" + error.stack;
+ }
+ errorDetailsArray.push(message);
+ const errorDetails = errorDetailsArray.join("\n");
210
211
reject(new Error("Child compilation failed:\n" + errorDetails));
212
0 commit comments