From 7310d25a243f55fde0f1cc23ef063230ec7cf6e2 Mon Sep 17 00:00:00 2001 From: Guy Bedford Date: Fri, 30 Apr 2021 17:39:01 +0200 Subject: [PATCH] fix: treat compilation.errors as a set (#705) --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 85419a74..c79e9308 100644 --- a/src/index.js +++ b/src/index.js @@ -358,7 +358,7 @@ function ncc ( compiler.close(err => { if (err) return reject(err); if (stats.hasErrors()) { - const errLog = stats.compilation.errors.map(err => err.message).join('\n'); + const errLog = [...stats.compilation.errors].map(err => err.message).join('\n'); return reject(new Error(errLog)); } resolve(stats);