Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed Apr 14, 2023
1 parent d3a3a3b commit 9e6010a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vite-node/src/client.ts
Expand Up @@ -190,10 +190,10 @@ export class ViteNodeRunner {

const getStack = () => `stack:\n${[...callstack, fsPath].reverse().map(p => ` - ${p}`).join('\n')}`

// check circular dependency
if (callstack.includes(fsPath) || callstack.some(c => this.moduleCache.get(c).importers?.has(fsPath))) {
if (mod.exports)
return mod.exports
throw new Error(`[vite-node] Failed to resolve circular dependency, ${getStack()}`)
}

let debugTimer: any
Expand Down

0 comments on commit 9e6010a

Please sign in to comment.