diff --git a/packages/astro/src/core/errors.ts b/packages/astro/src/core/errors.ts index fed83df84bdd..2926ad291525 100644 --- a/packages/astro/src/core/errors.ts +++ b/packages/astro/src/core/errors.ts @@ -181,12 +181,13 @@ export function getViteErrorPayload(err: ErrorWithMetadata): ErrorPayload { if (!plugin && err.hint) { plugin = 'astro'; } + const message = `${err.message}\n\n${err.hint ?? ''}`; return { type: 'error', err: { ...err, plugin, - message: err.hint ?? err.message, + message: message.trim(), stack: err.stack, } }