-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvite.config.mts
38 lines (36 loc) · 956 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
/// <reference types="vitest" />
/// <reference types="vite/client" />
/// <reference types="vite-plugin-svgr/client" />
import react from '@vitejs/plugin-react'
import viteTsconfigPaths from 'vite-tsconfig-paths'
import { defineConfig, configDefaults } from 'vitest/config'
import svgrPlugin from 'vite-plugin-svgr'
export default defineConfig({
base: './',
define: {
'process.env.REACT_APP_VERSION': JSON.stringify(
require('./package.json').version
)
},
plugins: [react(), viteTsconfigPaths(), svgrPlugin()],
build: {
outDir: 'build'
},
server: {
open: true,
hmr: {
overlay: false
}
},
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./src/setupTests.js'],
pool: 'threads',
coverage: {
provider: 'v8',
reporter: ['text'],
exclude: [...configDefaults.coverage.exclude, 'src/redux/*'] // ignore the redux boilerplate for coverage report
}
}
})