-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
57 lines (54 loc) · 1.14 KB
/
vite.config.ts
File metadata and controls
57 lines (54 loc) · 1.14 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
52
53
54
55
56
57
/// <reference types="vitest" />
import path from 'node:path';
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vite';
const ReactCompilerConfig = {};
// https://vitejs.dev/config/
export default defineConfig({
plugins: [
tailwindcss(),
react({
babel: {
plugins: [['babel-plugin-react-compiler', ReactCompilerConfig]],
},
}),
],
resolve: {
alias: {
'~/': path.join(__dirname, './src/'),
},
},
test: {
environment: 'happy-dom',
globals: true,
clearMocks: true,
testTimeout: 50000,
setupFiles: '.vitest/setup.ts',
alias: [
{
find: /^monaco-editor$/,
replacement: `${__dirname}/node_modules/monaco-editor/esm/vs/editor/editor.api`,
},
],
coverage: {
provider: 'v8',
reportOnFailure: true,
include: [
'src/components/**/*.{ts,tsx}',
'src/utils/**/*.{ts,tsx}',
'src/hooks/**/*.{ts,tsx}',
'src/pages/**/*.{ts,tsx}',
'src/store/**/*.{ts,tsx}',
],
exclude: [
'src/**/__mocks__/**',
'src/**/@types/**',
'src/**/sample/**',
'src/**/store/**',
],
all: true,
reporter: ['json'],
},
},
});