-
Notifications
You must be signed in to change notification settings - Fork 4
/
vite.config.base.mts
41 lines (38 loc) · 1006 Bytes
/
vite.config.base.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
39
40
41
/// <reference types="vitest" />
import { defineConfig } from 'vite';
import viteTsConfigPaths from 'vite-tsconfig-paths';
export const viteBaseConfig = defineConfig({
plugins: [
viteTsConfigPaths({
root: '../../',
}),
],
// Uncomment this if you are using workers.
// worker: {
// plugins: [
// viteTsConfigPaths({
// root: '../../',
// }),
// ],
// },
test: {
globals: true,
environment: 'node',
coverage: {
reporter: ['text', 'html'],
exclude: ['node_modules/', '**/types'],
all: true,
branches: 80,
functions: 80,
lines: 80,
statements: 80,
},
cache: {
dir: '../../node_modules/.vitest',
},
include: [
'src/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
'tests/**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}',
],
},
});