generated from remarkablemark/vite-react-tailwind-template
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.mts
More file actions
45 lines (41 loc) · 861 Bytes
/
vite.config.mts
File metadata and controls
45 lines (41 loc) · 861 Bytes
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
import { resolve } from 'node:path';
import react from '@vitejs/plugin-react';
import { defineConfig } from 'vitest/config';
/**
* @see {@link https://vite.dev/config/}
*/
export default defineConfig({
base: process.env.BASE ?? '',
resolve: {
alias: {
src: resolve(__dirname, './src'),
},
},
plugins: [
react({
babel:
process.env.NODE_ENV === 'test'
? undefined
: {
plugins: [['babel-plugin-react-compiler']],
},
}),
],
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,
},
},
},
});