.umirc.local.ts
1.15 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
import { defineConfig } from 'umi';
export default defineConfig({
runtimePublicPath: true,
devServer: {
port: 5203,
proxy: {
dev: {
'/api/': {
target: 'https://preview.pro.ant.design',
changeOrigin: true,
pathRewrite: { '^': '' },
},
'/open/': {
target: 'https://test.qgutech.com',
changeOrigin: true,
},
},
test: {
'/api/': {
target: 'https://preview.pro.ant.design',
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
pre: {
'/api/': {
target: 'your pre url',
changeOrigin: true,
pathRewrite: { '^': '' },
},
},
},
},
define: {
'process.env.site': 'http://qx-test.qgutech.com',
// 'process.env.apiUrl': 'http://192.168.181.107/qgyun-api',
// 'process.env.apiUrl': 'http://192.168.1.180/qx-api',
'process.env.apiUrl': 'http://test.qgutech.com/qx-api',
// 'process.env.apiUrl': 'https://qinggutest01.gifthulu.com/qx-api',
// 'process.env.apiUrl': 'https://uat.qgutech.com/qx-api',
'process.env.openUrl': '/open',
}
});