vben
authored
|
1
|
import { defineApplicationConfig } from '@vben/vite-config';
|
|
2
|
import { getAppEnvConfig } from '/@/utils/env';
|
Vben
authored
|
3
|
|
|
4
|
// const { VITE_ALIYUN_OSS_DOMAIN } = getAppEnvConfig();
|
vben
authored
|
5
6
|
export default defineApplicationConfig({
overrides: {
|
sanmu
authored
|
7
8
9
|
// build: {
// sourcemap: 'inline',
// },
|
vben
authored
|
10
11
12
13
14
15
16
17
18
19
20
21
|
optimizeDeps: {
include: [
'echarts/core',
'echarts/charts',
'echarts/components',
'echarts/renderers',
'qrcode',
'@iconify/iconify',
'ant-design-vue/es/locale/zh_CN',
'ant-design-vue/es/locale/en_US',
],
},
|
vben
authored
|
22
|
server: {
|
vben
authored
|
23
|
proxy: {
|
|
24
|
'/aliyun-oss-pdf': {
|
|
25
|
target: 'https://alterego.oss-cn-qingdao.aliyuncs.com',
|
|
26
27
28
29
30
31
|
changeOrigin: true,
secure: true, // 确保使用 HTTPS
rewrite(path) {
return path.replace(/^\/aliyun-oss-pdf/, '');
},
},
|
sanmu
authored
|
32
|
'/basic-api/order': {
|
|
33
|
target: 'http://47.104.8.35:18000',
|
|
34
|
// target: 'http://localhost:18000',
|
|
35
36
37
38
39
40
41
42
43
|
// target: 'http://39.108.227.113:8000',
// target: 'http://localhost:8000',
// target: 'http://39.108.227.113:3000/mock/35',
// http://39.108.227.113:8000/order/erp/captcha/get_img_captcha_code
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
},
'/basic-api/project': {
|
|
44
|
target: 'http://47.104.8.35:18000',
|
|
45
|
// target: 'http://localhost:18000',
|
柏杨
authored
|
46
|
// target: 'http://39.108.227.113:8000',
|
柏杨
authored
|
47
|
// target: 'http://localhost:8000',
|
sanmu
authored
|
48
|
// target: 'http://39.108.227.113:3000/mock/35',
|
sanmu
authored
|
49
|
// http://39.108.227.113:8000/order/erp/captcha/get_img_captcha_code
|
vben
authored
|
50
51
52
|
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/basic-api`), ''),
|
sanmu
authored
|
53
54
|
},
'/api/localStorage/upload': {
|
|
55
|
target: 'http://47.104.8.35:18000',
|
|
56
|
// target: 'http://localhost:18000',
|
柏杨
authored
|
57
58
|
// target: 'http://39.108.227.113:8000',
// target: '192.168.31.250:18000',
|
柏杨
authored
|
59
|
// target: 'http://localhost:8000',
|
sanmu
authored
|
60
61
62
63
64
65
|
changeOrigin: true,
ws: true,
// rewrite: (path) => {
// console.log('%c [ path ]-32', 'font-size:13px; background:pink; color:#bf2c9f;', path);
// return path.replace(new RegExp(`^/basic-api`), '');
// },
|
vben
authored
|
66
67
68
69
|
// only https
// secure: false
},
'/upload': {
|
柏杨
authored
|
70
|
// target: 'http://localhost:3300/upload',
|
vben
authored
|
71
72
73
74
|
target: 'http://localhost:3300/upload',
changeOrigin: true,
ws: true,
rewrite: (path) => path.replace(new RegExp(`^/upload`), ''),
|
vben
authored
|
75
|
},
|
vben
authored
|
76
|
},
|
vben
authored
|
77
|
},
|
vben
authored
|
78
79
|
},
});
|