diff --git a/.nx/version-plans/version-plan-1768465317882.md b/.nx/version-plans/version-plan-1768465317882.md new file mode 100644 index 0000000..49fe555 --- /dev/null +++ b/.nx/version-plans/version-plan-1768465317882.md @@ -0,0 +1,5 @@ +--- +__default__: prerelease +--- + +Bundling errors are now displayed in the CLI output, providing immediate feedback when build issues occur. diff --git a/packages/runtime/src/bundler/errors.ts b/packages/runtime/src/bundler/errors.ts index 53bcc7c..55ad449 100644 --- a/packages/runtime/src/bundler/errors.ts +++ b/packages/runtime/src/bundler/errors.ts @@ -20,7 +20,8 @@ export class BundlingFailedError extends Error { public readonly modulePath: string, public readonly reason: string ) { - super(`Bundling of ${modulePath} failed`); + const reasonMessage = JSON.parse(reason).message ?? reason; + super(`Bundling of ${modulePath} failed with error:\n\n${reasonMessage}\n`); this.name = 'BundlingFailedError'; } }