-
Notifications
You must be signed in to change notification settings - Fork 4
/
vitest.config.ts
37 lines (36 loc) · 1.19 KB
/
vitest.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
import { defineConfig } from 'vitest/config';
export default defineConfig({
test: {
globals: true,
environment: 'jsdom',
setupFiles: ['./tests/setup.ts'],
},
server: {
proxy: {
'/api': {
target: process.env.VITE_BASE_URL,
changeOrigin: true,
rewrite: (path) => path.replace(/^\/api/, ''),
},
},
},
resolve: {
alias: [
{ find: '@', replacement: '/src' },
{ find: '@api', replacement: '/src/api' },
{ find: '@pages', replacement: '/src/pages' },
{ find: '@routes', replacement: '/src/routes' },
{ find: '@components', replacement: '/src/components' },
{ find: '@hooks', replacement: '/src/hooks' },
{ find: '@styles', replacement: '/src/styles' },
{ find: '@stores', replacement: '/src/stores' },
{ find: '@contexts', replacement: '/src/contexts' },
{ find: '@type', replacement: '/src/type' },
{ find: '@constants', replacement: '/src/constants' },
{ find: '@utils', replacement: '/src/utils' },
{ find: '@assets', replacement: '/src/assets' },
{ find: '@tests', replacement: '/src/tests' },
{ find: '@mocks', replacement: '/src/mocks' },
],
},
});