-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathvite.config.ts
41 lines (38 loc) · 987 Bytes
/
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
import path from 'path';
import react from '@vitejs/plugin-react';
import markdownPlugin from 'vite-plugin-markdown';
import svgr from 'vite-plugin-svgr';
import { defineConfig } from 'vitest/config';
import reactDisplayNamePlugin from './vite-plugin-react-displayname';
export default defineConfig({
resolve: {
alias: {
'@waldur': path.resolve(__dirname, './src/'),
'react-windowed-select': path.resolve(
'node_modules/react-windowed-select/dist/main.js',
),
},
},
plugins: [
react(),
svgr({
include: '**/*.svg',
svgrOptions: {
dimensions: false,
plugins: ['@svgr/plugin-svgo', '@svgr/plugin-jsx'],
},
}),
// @ts-ignore
markdownPlugin.default({ mode: 'react' }),
reactDisplayNamePlugin(),
],
build: {
sourcemap: true,
},
test: {
include: ['**/*.test.ts', '**/*.test.tsx'],
globals: true,
environment: 'jsdom',
setupFiles: ['./test/setupTests.js'],
},
});