|
@@ -7,14 +7,23 @@ export default {
|
|
|
include: ['schart.js']
|
|
include: ['schart.js']
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- server:{
|
|
|
|
|
|
|
+ // server:{
|
|
|
|
|
+ // proxy: {
|
|
|
|
|
+ // '/api': 'http://114.212.245.120:7788/',
|
|
|
|
|
+ // // '/api': {
|
|
|
|
|
+ // // target: 'http://114.212.245.120:7788/',
|
|
|
|
|
+ // // changeOrigin: true,
|
|
|
|
|
+ // // // rewrite: path => path.replace(/^\/api/, '')
|
|
|
|
|
+ // // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // },
|
|
|
|
|
+ server: {
|
|
|
proxy: {
|
|
proxy: {
|
|
|
- '/api': 'http://114.212.245.120:7788/',
|
|
|
|
|
- // '/api': {
|
|
|
|
|
- // target: 'http://114.212.245.120:7788/',
|
|
|
|
|
- // changeOrigin: true,
|
|
|
|
|
- // // rewrite: path => path.replace(/^\/api/, '')
|
|
|
|
|
- // }
|
|
|
|
|
|
|
+ '/api': {
|
|
|
|
|
+ target: 'http://localhost:8080/api',
|
|
|
|
|
+ changeOrigin: true,
|
|
|
|
|
+ rewrite: (path) => path.replace(/^\/api/, '') // 不可以省略rewrite
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
devServer: {
|
|
devServer: {
|