Describe the bug
resolve.conditions is not respected on Vite 6 with Vitest.
- It works on Vite 6 without Vitest.
- It works on Vite 5.
// vitest.config.ts
import { defineConfig } from 'vitest/config'
export default defineConfig({
resolve: {
conditions: ['dev'],
},
})
Reproduction
https://stackblitz.com/~/github.com/sxzz/vitest-conditions-repro
- Run
pnpm run test, and you will see the test has failed.
- Downgrade to vite@5, remove
node_modules and pnpm-lock.yaml, and it works.
System Info
Used Package Manager
pnpm
Validations
Describe the bug
resolve.conditionsis not respected on Vite 6 with Vitest.Reproduction
https://stackblitz.com/~/github.com/sxzz/vitest-conditions-repro
pnpm run test, and you will see the test has failed.node_modulesandpnpm-lock.yaml, and it works.System Info
Used Package Manager
pnpm
Validations