-
Notifications
You must be signed in to change notification settings - Fork 2
/
vite.config.mts
38 lines (37 loc) · 912 Bytes
/
vite.config.mts
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
import { configDefaults, UserConfig, defineConfig } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import eslint from 'vite-plugin-eslint';
import { nodePolyfills } from 'vite-plugin-node-polyfills';
export default defineConfig({
base: '/',
envPrefix: 'REACT_APP_',
plugins: [react(), nodePolyfills(), eslint()] as UserConfig['plugins'],
build: {
outDir: './build',
emptyOutDir: true,
},
server: {
host: true,
port: 3000,
},
preview: {
port: 3000,
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
css: {
modules: {
classNameStrategy: 'non-scoped',
},
},
reporters: ['verbose'],
coverage: {
reporter: ['clover', 'json', 'lcov', 'text'],
include: ['src/**/*'],
provider: 'istanbul',
},
exclude: [...configDefaults.exclude, 'e2e/**']
},
});