Update frontend/babel.config.js
Browse files- frontend/babel.config.js +17 -5
frontend/babel.config.js
CHANGED
@@ -1,6 +1,18 @@
|
|
1 |
-
module.exports = {
|
2 |
-
presets: [
|
3 |
-
'@vue/cli-plugin-babel/preset',
|
4 |
-
],
|
5 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
|
|
1 |
+
module.exports = {
|
2 |
+
presets: [
|
3 |
+
'@vue/cli-plugin-babel/preset',
|
4 |
+
],
|
5 |
+
|
6 |
+
//配置前端的开发服务器的代理后端API
|
7 |
+
devServer: {
|
8 |
+
proxy: {
|
9 |
+
'/api': {
|
10 |
+
target: 'http://localhost:8000', // 后端服务器地址
|
11 |
+
changeOrigin: true,
|
12 |
+
pathRewrite: { '^/api': '' },
|
13 |
+
},
|
14 |
+
},
|
15 |
+
},
|
16 |
+
|
17 |
+
};
|
18 |
|