16 lines
400 B
TypeScript
16 lines
400 B
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import { defineConfig } from 'vitest/config'
|
|
|
|
// 测试独立配置,不复用 vite.config:其 PWA/手动分包插件与单测无关且拖慢启动
|
|
export default defineConfig({
|
|
resolve: {
|
|
alias: {
|
|
'@': fileURLToPath(new URL('./src', import.meta.url)),
|
|
},
|
|
},
|
|
test: {
|
|
environment: 'happy-dom',
|
|
include: ['src/**/*.test.ts'],
|
|
},
|
|
})
|