build: fix alerts

This commit is contained in:
undefined committed 2021-09-15 17:36:56 +08:00
1 parent d7412fcc1e
commit 14df7d7a05
3 files changed
+4 -3

No files matched your search

+3 -1
View File
@@ -36,7 +36,9 @@ function runWebpack({
if (err) {
console.error(err.stack || err);
if (err.details) console.error(err.details);
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
reject(err);
return;
}
if (argv.options.detail) console.log(stats.toString());
if (!watch && (!stats || stats.hasErrors())) process.exitCode = 1;
@@ -50,7 +52,7 @@ function runWebpack({
async function runGulp() {
function handleError(err) {
log(chalk.red('Error: %s'), chalk.reset(err.toString() + err.stack));
if (err) process.exit(1);
process.exit(1);
}
const gulpTasks = gulpConfig({ production: true, errorHandler: handleError });
return new Promise((resolve) => {