Skip to content

Commit

Permalink
fix: avoid hiding original rollup error message
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 committed Jan 23, 2023
1 parent 6b65508 commit a5586f8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ async function _watch(nitro: Nitro, rollupConfig: RollupConfig) {

function formatRollupError(_error: RollupError | OnResolveResult) {
try {
const logs: string[] = [];
const logs: string[] = [_error.toString()];
for (const error of "errors" in _error
? _error.errors
: [_error as RollupError]) {
Expand All @@ -354,7 +354,7 @@ function formatRollupError(_error: RollupError | OnResolveResult) {
`Rollup error while processing \`${path}\`` + text ? "\n\n" + text : ""
);
}
return logs.join("\n\n");
return logs.join("\n");
} catch {
return _error?.toString();
}
Expand Down

0 comments on commit a5586f8

Please sign in to comment.