Skip to content

Commit a72fe4a

Browse files
authored
Enhance error message for bundling failures
1 parent 989d211 commit a72fe4a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

packages/runtime/src/bundler/errors.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@ export class BundlingFailedError extends Error {
2020
public readonly modulePath: string,
2121
public readonly reason: string
2222
) {
23-
super(`Bundling of ${modulePath} failed`);
23+
const reasonMessage = JSON.parse(reason).message ?? reason;
24+
super(`Bundling of ${modulePath} failed with error:\n\n${reasonMessage}\n`);
2425
this.name = 'BundlingFailedError';
2526
}
2627
}

0 commit comments

Comments
 (0)