-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
46 lines (44 loc) · 1.01 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
/// <reference types="vitest" />
import { defineConfig } from 'vite'
import { configDefaults } from 'vitest/config'
import reactRefresh from '@vitejs/plugin-react'
import svgrPlugin from 'vite-plugin-svgr'
import path from 'path'
// https://vitejs.dev/config/
export default defineConfig({
// This changes the out put dir from dist to build
// comment this out if that isn't relevant for your project
resolve: {
alias: {
'@': path.resolve(__dirname, './src'),
},
},
build: {
outDir: './build',
},
server: {
port: 3000,
},
plugins: [
reactRefresh(),
svgrPlugin({
svgrOptions: {
icon: true,
// ...svgr options (https://react-svgr.com/docs/options/)
},
}),
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './src/setupTests.ts',
exclude: [...configDefaults.exclude],
coverage: {
reporter: ['text', 'json', 'html'],
lines: 81,
functions: 80,
branches: 90,
statements: 81,
},
},
})