-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
54 lines (49 loc) · 1.02 KB
/
vite.config.mts
File metadata and controls
54 lines (49 loc) · 1.02 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
import { resolve } from 'node:path';
import babel from '@rolldown/plugin-babel';
import react, { reactCompilerPreset } from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
export default defineConfig({
build: {
rolldownOptions: {
output: {
codeSplitting: {
groups: [
{
name: 'react',
test: /node_modules\/(react|react-dom)/,
},
],
},
},
},
},
plugins: [
react(),
babel({
presets:
process.env.NODE_ENV === 'test' ? undefined : [reactCompilerPreset()],
}),
],
resolve: {
alias: {
src: resolve(__dirname, './src'),
},
},
test: {
environment: 'jsdom',
setupFiles: ['./src/setupTests.ts'],
globals: true,
coverage: {
include: ['src/**/*.{ts,tsx}'],
exclude: [
'src/**/*.d.ts',
'src/**/*.types.ts',
'src/**/index.ts',
'src/types/',
],
thresholds: {
100: true,
},
},
},
});