-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathvite.config.ts
More file actions
35 lines (34 loc) · 906 Bytes
/
vite.config.ts
File metadata and controls
35 lines (34 loc) · 906 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
import tailwindcss from '@tailwindcss/vite';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
import { defineConfig } from 'vite';
import svgr from 'vite-plugin-svgr';
export default defineConfig(() => {
return {
plugins: [react(), tailwindcss(), svgr()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
test: {
environment: 'jsdom',
globals: true,
setupFiles: './src/setupTests.ts',
},
server: {
proxy: {
'/api': {
target: 'https://apis.data.go.kr/B551011/KorService2',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),
},
'/path/navigation': {
target: 'https://apis.openapi.sk.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/path\/navigation/, ''),
},
},
},
};
});