Skip to content

Commit 70d62db

Browse files
committed
output warnings without exit
1 parent ff67bd2 commit 70d62db

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/vue-build

+6-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,12 @@ if (production) {
309309
process.exitCode = 1
310310
return console.error(err.stack)
311311
}
312-
if (stats.hasErrors() || stats.hasWarnings()) {
312+
// output warning
313+
if (stats.hasWarnings() && !stats.hasErrors()) {
314+
console.error(stats.toString('errors-only'))
315+
}
316+
// output wanring and errors
317+
if (stats.hasErrors()) {
313318
process.exitCode = 1
314319
return console.error(stats.toString('errors-only'))
315320
}

0 commit comments

Comments
 (0)