-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvite.config.ts
38 lines (37 loc) · 1.26 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
/// <reference types="vitest" />
/// <reference types="vite/client" />
import { defineConfig } from 'vite';
import ssr from 'vite-plugin-ssr/plugin';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
// https://vitejs.dev/config/
export default defineConfig({
resolve: {
alias: {
'#': path.resolve(__dirname, './src'),
'#assets': path.resolve(__dirname, './src/assets'),
'#lib': path.resolve(__dirname, './src/lib'),
'#helpers': path.resolve(__dirname, './src/lib/helpers'),
'#libTestUtils': path.resolve(__dirname, './src/lib/test/testUtils.ts'),
'#contexts': path.resolve(__dirname, './src/client/contexts'),
'#components': path.resolve(__dirname, './src/client/components'),
'#clientTestUtils': path.resolve(
__dirname,
'./src/client/test/testUtils.tsx',
),
'#server': path.resolve(__dirname, './src/server'),
'#hooks': path.resolve(__dirname, './src/client/hooks'),
'#musicquizgenerator/types': path.resolve(__dirname, './src/types'),
},
},
plugins: [react(), ssr()],
test: {
globals: true,
environment: 'jsdom',
passWithNoTests: true,
setupFiles: ['./src/client/test/setup.ts', 'dotenv/config'],
},
server: {
middlewareMode: true,
},
});