-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathvite.config.js
More file actions
51 lines (51 loc) · 1.21 KB
/
vite.config.js
File metadata and controls
51 lines (51 loc) · 1.21 KB
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
49
50
51
import { VitePWA } from 'vite-plugin-pwa'
import { defineConfig } from 'vite'
import react from '@vitejs/plugin-react'
// https://vitejs.dev/config/
// https://vitest.dev/guide/reporters.html
// TODO : .env
export default defineConfig({
plugins: [
react(),
VitePWA({
registerType: 'autoUpdate',
workbox: {
clientsClaim: true,
skipWaiting: true
},
devOptions: {
enabled: true
},
})
],
test: {
globals: true,
environment: 'jsdom',
setupFiles: './vitest.setup.ts',
css: false,
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/e2e/**',
'**/.{idea,git,cache,output,temp}/**',
'**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress,tsup,build}.config.*'
],
coverage: {
provider: 'v8',
reporter: ['text', 'json', 'html'],
exclude: [
'**/node_modules/**',
'**/dist/**',
'**/e2e/**',
'**/*.test.{ts,tsx}',
'**/*.spec.{ts,tsx}',
'**/vitest.setup.ts',
'**/vite.config.js',
'**/playwright.config.ts',
'**/.{idea,git,cache,output,temp}/**',
'**/mocks/**',
'**/types/**',
],
},
},
})