Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

Commit

Permalink
fix(vite): show formatted vite-node errors (#7509)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Sep 14, 2022
1 parent e822c02 commit 326d628
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion packages/vite/src/runtime/vite-node.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,10 @@ function createRunner () {
if (!errorData) {
throw err
}
let _err
try {
const { message, stack } = formatViteError(errorData)
throw createError({
_err = createError({
statusMessage: 'Vite Error',
message,
stack
Expand All @@ -62,6 +63,7 @@ function createRunner () {
stack: 'Vite Error\nat [check console]'
})
}
throw _err
})
}
})
Expand Down

0 comments on commit 326d628

Please sign in to comment.