0
This commit is contained in:
parent
aab2bc1074
commit
03563a0384
BIN
vue/dist.zip
Normal file
BIN
vue/dist.zip
Normal file
Binary file not shown.
File diff suppressed because it is too large
Load Diff
@ -1,28 +1,19 @@
|
||||
const { defineConfig } = require("@vue/cli-service");
|
||||
module.exports = defineConfig({
|
||||
transpileDependencies: true,
|
||||
transpileDependencies: true,
|
||||
});
|
||||
const port = 1573;
|
||||
module.exports = {
|
||||
devServer: {
|
||||
port: port,
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'http://127.0.0.1:10002', // 后端接口的地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
'^/api': '', // 如果您的后端API路径不包含'/api',可以删除这一行
|
||||
},
|
||||
},
|
||||
// 特殊代理规则(直接发送到后端的 POST 请求)
|
||||
// '/admin/upload': {
|
||||
// target: 'http://192.168.10.20:10002', // 直接发送到后端的地址
|
||||
// changeOrigin: true,
|
||||
// pathRewrite: {
|
||||
// '^/admin/upload': '' // 重写路径,去掉 /admin/upload 前缀
|
||||
// }
|
||||
// },
|
||||
},
|
||||
},
|
||||
devServer: {
|
||||
port: port,
|
||||
proxy: {
|
||||
"/api": {
|
||||
target: "http://127.0.0.1:10002", // 后端接口的地址
|
||||
changeOrigin: true,
|
||||
pathRewrite: {
|
||||
"^/api": "", // 如果您的后端API路径不包含'/api',可以删除这一行
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user