-
Notifications
You must be signed in to change notification settings - Fork 1
/
vite.config.ts
48 lines (47 loc) · 1.07 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
/// <reference types="vitest" />
import react from '@vitejs/plugin-react';
import * as path from 'node:path';
import { defineConfig } from 'vite';
import tsconfigPaths from 'vite-tsconfig-paths';
// https://vitejs.dev/config/
export default defineConfig({
build: {
sourcemap: true,
outDir: 'build',
chunkSizeWarningLimit: 700,
},
plugins: [react(), tsconfigPaths()],
server: {
host: true,
port: 3000,
},
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: ['./src/setupTests.ts'],
coverage: {
provider: 'v8', // 'v8' or 'istanbul'
reporter: ['text', 'json', 'html'],
exclude: [
'**/src/setupTests.ts',
'**/__mocks__/*',
'**/node_modules/**/*',
'**/build/**',
'**/dist/**',
'**/coverage/**',
'**/public/**',
'**/*.d.ts',
'**/index.tsx',
'**/index.ts',
'**/index.html',
'**/.eslintrc.cjs',
'**/*.config.{js, ts}',
],
},
},
});