Files
张翔 9e635b1483 chore: 配置与基础设施更新
- 开发服务器端口从 3002 改为 5174
- vitest 配置从 vue plugin 改为 react plugin
- playwright 新增 uat 项目配置,修正 baseURL
- 添加 less 依赖支持
- 修复各页面 catch 块空语句为注释标记
2026-05-06 19:43:39 +08:00

45 lines
952 B
TypeScript

import { defineConfig } from 'vitest/config'
import react from '@vitejs/plugin-react'
import { fileURLToPath } from 'node:url'
export default defineConfig({
plugins: [react()],
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/__tests__/setup.ts'],
include: [
'src/__tests__/**/*.{test,spec}.{js,ts,jsx,tsx}',
],
exclude: [
'node_modules/',
'dist/',
'e2e/**/*.spec.ts',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html', 'lcov'],
exclude: [
'node_modules/',
'src/__tests__/',
'**/*.d.ts',
'**/*.config.*',
'**/mockData',
'e2e/',
],
lines: 80,
functions: 80,
branches: 80,
statements: 80,
},
},
resolve: {
alias: {
'@': fileURLToPath(new URL('./src', import.meta.url)),
},
},
})