-
Notifications
You must be signed in to change notification settings - Fork 0
/
vite.config.ts
80 lines (74 loc) · 1.79 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
/// <reference types="vitest" />
import dotenv from 'dotenv';
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import path from 'path';
import { createHtmlPlugin } from 'vite-plugin-html';
import { VitePluginRadar } from 'vite-plugin-radar';
dotenv.config();
const viteAnalyticsId = process.env.VITE_ANALYTICS_ID;
export default defineConfig({
plugins: [
react(),
createHtmlPlugin({
minify: true,
}),
VitePluginRadar({
analytics: {
id: viteAnalyticsId,
},
}),
],
root: './',
publicDir: 'public',
test: {
coverage: {
clean: true,
provider: 'istanbul',
reporter: ['html', 'text'],
include: ['src/**/*.ts?(x)'],
exclude: ['src/**/*.js?(x)', 'src/index.tsx', 'src/**/*.test.ts?(x)'],
all: true,
reportsDirectory: './coverage',
thresholds: {
autoUpdate: true,
statements: 100,
branches: 98.19,
functions: 100,
lines: 100,
},
},
globals: true,
environment: 'jsdom',
setupFiles: './setupTests.ts',
reporters: ['verbose'],
},
resolve: {
alias: [
{
find: '@configuration',
replacement: path.resolve(__dirname, './src/configuration'),
},
{
find: '@components',
replacement: path.resolve(__dirname, './src/components'),
},
{
find: '@enums',
replacement: path.resolve(__dirname, './src/enums'),
},
{
find: '@interfaces',
replacement: path.resolve(__dirname, './src/interfaces'),
},
{
find: '@functions',
replacement: path.resolve(__dirname, './src/functions'),
},
{
find: '@hooks',
replacement: path.resolve(__dirname, './src/hooks'),
},
],
},
});