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
| module.exports = {
| devServer: {
| host: '0.0.0.0', // 外网访问
| port: 8080, // 端口号
| https: false, // https:{type:Boolean}
| open: false, // 配置自动启动浏览器 open: 'Google Chrome'-默认启动谷歌
|
| // 配置多个代理
| proxy: {
| '/sso': {
| target: 'http://192.168.40.80:12344/sso/',
| ws: true, // 代理的WebSockets
| changeOrigin: true, // 允许websockets跨域
| pathRewrite: {
| '^/sso': '',
| },
| },
| '/base': {
| target: 'http://192.168.40.80:12345/base/',
| ws: true, // 代理的WebSockets
| changeOrigin: true, // 允许websockets跨域
| pathRewrite: {
| '^/base': '',
| },
| },
| '/platform': {
| target: 'http://192.168.40.80:12346/platform/',
| ws: true, // 代理的WebSockets
| changeOrigin: true, // 允许websockets跨域
| pathRewrite: {
| '^/platform': '',
| },
| },
| '/production': {
| target: 'http://192.168.40.80:12347/production/',
| ws: true, // 代理的WebSockets
| changeOrigin: true, // 允许websockets跨域
| pathRewrite: {
| '^/production': '',
| },
| },
| '/station': {
| target: 'http://192.168.40.80:12349/station/',
| ws: true, // 代理的WebSockets
| changeOrigin: true, // 允许websockets跨域
| pathRewrite: {
| '^/station': '',
| },
| },
| },
| },
| }
|
|