Skip to content

Commit

Permalink
fix: print ssrTransform error (#6885)
Browse files Browse the repository at this point in the history
  • Loading branch information
hi-ogawa authored Nov 12, 2024
1 parent 98f76ea commit 4c96cce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vitest/src/node/pools/rpc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ export function createMethodsRPC(project: WorkspaceProject, options: MethodsOpti

// serialize rollup error on server to preserve details as a test error
function handleRollupError(e: unknown): never {
if (e instanceof Error && 'plugin' in e) {
if (
e instanceof Error
&& ('plugin' in e || 'frame' in e || 'id' in e)
) {
// eslint-disable-next-line no-throw-literal
throw {
name: e.name,
Expand Down

0 comments on commit 4c96cce

Please sign in to comment.