diff --git a/packages/vitest/src/node/pools/rpc.ts b/packages/vitest/src/node/pools/rpc.ts index fe792d414db9..9018c2b9a6bd 100644 --- a/packages/vitest/src/node/pools/rpc.ts +++ b/packages/vitest/src/node/pools/rpc.ts @@ -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,