From 880af779b20effe14d7cd3c7c8602c22f9eeadb1 Mon Sep 17 00:00:00 2001 From: Romstar Date: Wed, 18 Oct 2023 09:56:42 -0400 Subject: [PATCH] Closes #185. Added stats.hasError check per Webpack documentation. https://webpack.js.org/api/node/\#:\~:text\=The%20err%20object%20will%20not%20include --- utils/build.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/utils/build.js b/utils/build.js index afa0b9b1f..3234ae915 100755 --- a/utils/build.js +++ b/utils/build.js @@ -22,6 +22,9 @@ config.plugins = (config.plugins || []).concat( }) ); -webpack(config, function (err) { - if (err) throw err; +webpack(config, (err, stats) => { + if (err || stats.hasErrors()) { + console.error('stats:', stats.toString({ colors: true })); + } + // Done processing });