-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.ts
51 lines (49 loc) · 1.27 KB
/
vite.config.ts
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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import react from '@vitejs/plugin-react';
import { visualizer } from 'rollup-plugin-visualizer';
import tsconfigPaths from 'vite-tsconfig-paths';
import { defineConfig } from 'vitest/config';
export default defineConfig({
server: {
port: 3000,
},
plugins: [react(), tsconfigPaths(), visualizer()],
build: {
outDir: 'build',
},
preview: {
port: 5002,
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.tsx'],
reporters: ['default', 'vitest-sonar-reporter'],
outputFile: 'test-report.xml',
testTimeout: 50000,
include: ['src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}'],
coverage: {
provider: 'v8',
reporter: ['json', 'lcov', 'text', 'clover', 'html'],
exclude: [
'src/setupTests.tsx',
'src/shared/testsUtils/**/*.{ts,tsx}',
'src/**/index.{ts,tsx}',
'src/**/*.test.{js,ts}',
'src/**/__tests__/*.{ts,tsx}',
'src/**/constants.ts',
'scripts/**',
'src/templates/**',
'src/**/*.d.ts',
'*.cjs',
'build/*',
'vite.config.ts',
'eslint.config.mjs',
],
thresholds: {
100: true,
},
},
},
});