Skip to content

Commit

Permalink
Closes lxieyang#185. Added stats.hasError check per Webpack documenta…
Browse files Browse the repository at this point in the history
  • Loading branch information
Romstar committed Oct 18, 2023
1 parent f7b0a5b commit 880af77
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions utils/build.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
});

0 comments on commit 880af77

Please sign in to comment.