fix(vite): show formatted vite-node errors (#7509)

This commit is contained in:
pooya parsa 2022-09-14 17:58:28 +02:00 committed by GitHub
parent e822c02cdc
commit 326d62803b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
@ -62,6 +63,7 @@ function createRunner () {
stack: 'Vite Error\nat [check console]'
})
}
throw _err
})
}
})