1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25import { fileURLToPath } from 'node:url'
import { configDefaults, defineConfig, mergeConfig } from 'vitest/config'
import viteConfig from './vite.config'
export default mergeConfig(
viteConfig,
defineConfig({
test: {
globals: true,
environment: 'happy-dom',
include: ['**/*.spec.ts'],
exclude: [...configDefaults.exclude, 'e2e/**', 'node_modules/**', 'dist/**'],
root: fileURLToPath(new URL('./', import.meta.url)),
deps: {
optimizer: {
web: {
// https://github.com/vitest-dev/vitest/issues/4074
exclude: ['vue'],
},
},
},
},
}),
)