diff options
author | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 00:03:11 -0400 |
---|---|---|
committer | (quasar) nebula <qznebula@protonmail.com> | 2023-12-30 13:07:03 -0400 |
commit | 63a14c5f1714839382568ca259bc96b6a501a088 (patch) | |
tree | deb960ecd779ef1a3655288f85907e9b312695cf /src/write/build-modes | |
parent | 9302a8b165f67e8de44300cfda8aa26287e9609a (diff) |
write: live-dev-server: use showAggregate more aggressively
Diffstat (limited to 'src/write/build-modes')
-rw-r--r-- | src/write/build-modes/live-dev-server.js | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/write/build-modes/live-dev-server.js b/src/write/build-modes/live-dev-server.js index e2c976b9..2538cb30 100644 --- a/src/write/build-modes/live-dev-server.js +++ b/src/write/build-modes/live-dev-server.js @@ -84,11 +84,14 @@ export async function go({ niceShowAggregate, }) { const showError = (error) => { - if (error instanceof AggregateError && niceShowAggregate) { - niceShowAggregate(error); - } else { - console.error(inspect(error, {depth: Infinity})); + if (niceShowAggregate) { + if (error.errors || error.cause) { + niceShowAggregate(error); + return; + } } + + console.error(inspect(error, {depth: Infinity})); }; const host = cliOptions['host'] ?? defaultHost; |