fix(vite): log error object (#2420)

This commit is contained in:
Daniel Roe 2021-12-17 09:08:09 +00:00 committed by GitHub
parent 23397e603c
commit df33474730
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -80,7 +80,7 @@ async function transformRequest (opts: TransformOptions, id: string) {
// Transform
const res: SSRTransformResult = await opts.viteServer.transformRequest(id, { ssr: true }).catch((err) => {
// eslint-disable-next-line no-console
console.warn(`[SSR] Error transforming ${id}: ${err}`)
console.warn(`[SSR] Error transforming ${id}:`, err)
// console.error(err)
}) as SSRTransformResult || { code: '', map: {}, deps: [], dynamicDeps: [] }