-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
53 lines (52 loc) · 1.16 KB
/
Copy pathvite.config.ts
File metadata and controls
53 lines (52 loc) · 1.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
// https://vite.dev/config/
export default defineConfig({
base: './',
build: {
outDir: 'dist',
},
plugins: [react()],
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
test: {
coverage: {
all: false,
exclude: [
'src/test/**',
'**/types/**',
'**/*.d.ts',
'src/**/index.ts',
'src/main.tsx',
],
extension: ['.ts', '.tsx'],
include: ['src/**/*'],
provider: 'v8',
reporter: ['text', 'json', 'html'],
thresholds: {
lines: 80,
functions: 70,
branches: 60,
},
},
typecheck: {
enabled: true,
include: ['**/*.test-d.ts'],
},
css: {
modules: { classNameStrategy: 'non-scoped' },
},
exclude: ['**/node_modules/**', '**/e2e/**'],
include: ['**/*.{test,spec}.{ts,tsx}'],
environment: 'jsdom',
globals: true,
maxConcurrency: 4,
setupFiles: ['./vitest.setup.mjs'],
cache: { dir: './node_modules/.vite/.vitest-cache' },
},
});