Skip to content

Commit

Permalink
fix: custom resolver conditions on ssr environment
Browse files Browse the repository at this point in the history
closes #6992
  • Loading branch information
sxzz committed Nov 30, 2024
1 parent 1fa16f9 commit 02af5d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/vitest/src/node/plugins/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ export async function VitestPlugin(
// by default Vite resolves `module` field, which not always a native ESM module
// setting this option can bypass that and fallback to cjs version
mainFields: [],
conditions: ['node'],
conditions: ['node', ...viteConfig.resolve?.conditions || []],
},
},
},
Expand Down

0 comments on commit 02af5d7

Please sign in to comment.