-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvite.config.ts
More file actions
54 lines (52 loc) · 1.64 KB
/
vite.config.ts
File metadata and controls
54 lines (52 loc) · 1.64 KB
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
46
47
48
49
50
51
52
53
54
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react-swc';
import path from 'path';
export default defineConfig({
plugins: [react()],
resolve: {
extensions: ['.js', '.jsx', '.ts', '.tsx', '.json'],
alias: {
'recharts@2.15.2': 'recharts',
'next-themes@0.4.6': 'next-themes',
'lucide-react@0.487.0': 'lucide-react',
'class-variance-authority@0.7.1': 'class-variance-authority',
'@radix-ui/react-tooltip@1.1.8': '@radix-ui/react-tooltip',
'@radix-ui/react-slot@1.1.2': '@radix-ui/react-slot',
'@radix-ui/react-select@2.1.6': '@radix-ui/react-select',
'@radix-ui/react-progress@1.1.2': '@radix-ui/react-progress',
'@': path.resolve(__dirname, './src'),
},
},
build: {
target: 'esnext',
outDir: 'dist',
},
server: {
port: 3000,
open: true,
proxy: {
'/api/yahoo': {
target: 'https://query1.finance.yahoo.com',
changeOrigin: true,
secure: true,
rewrite: (path) => path.replace(/^\/api\/yahoo/, ''),
headers: {
'User-Agent': 'Mozilla/5.0',
'Accept': 'application/json,text/plain,*/*',
},
},
'/proxy/okx': {
target: 'https://www.okx.com',
changeOrigin: true,
secure: true,
rewrite: (path) => path.replace(/^\/proxy\/okx/, ''),
},
'/proxy/bybit': {
target: 'https://api.bybit.com',
changeOrigin: true,
secure: true,
rewrite: (path) => path.replace(/^\/proxy\/bybit/, ''),
},
},
},
});