-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.mts
More file actions
39 lines (38 loc) · 885 Bytes
/
vite.config.mts
File metadata and controls
39 lines (38 loc) · 885 Bytes
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
import { configDefaults } from 'vitest/config';
import react from '@vitejs/plugin-react-swc';
import eslint from '@nabla/vite-plugin-eslint';
import { defineConfig } from 'vite';
export default defineConfig(({ mode }) => ({
base: '/',
envPrefix: 'REACT_APP_',
plugins: [react(), mode !== 'test' && eslint()],
build: {
outDir: './build',
emptyOutDir: true,
sourcemap: 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/**'],
},
}));