Skip to content

Commit e3c6885

Browse files
committed
ensure the CLI in watch mode keeps running when on error
1 parent 418d223 commit e3c6885

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/cli.js

+9
Original file line numberDiff line numberDiff line change
@@ -705,6 +705,15 @@ async function build() {
705705
let end = process.hrtime.bigint()
706706
console.error('Done in', (end - start) / BigInt(1e6) + 'ms.')
707707
})
708+
.catch((err) => {
709+
if (typeof err === 'string') {
710+
console.error(err)
711+
} else if (err.name === 'CssSyntaxError') {
712+
console.error(err.toString())
713+
} else {
714+
console.error(err)
715+
}
716+
})
708717
}
709718

710719
let css = input

0 commit comments

Comments
 (0)