chore(env): 相对路径替换绝对路径

This commit is contained in:
ywk 2025-04-09 16:59:40 +08:00
parent adde07d79d
commit 9968bcf674
3 changed files with 12 additions and 3 deletions

View File

@ -23,5 +23,5 @@ ENV = 'development'
#VUE_APP_BASE_API = 'http://192.168.31.159:8080'
#测试
VUE_APP_BASE_API = 'http://t-mana.beida413.com/prod-api'
VUE_APP_BASE_API = '/prod-api'
# VUE_APP_BASE_API = 'http://127.0.0.1:8080'

View File

@ -2,7 +2,7 @@
ENV = 'production'
# base api
VUE_APP_BASE_API = 'http://t-mana.beida413.com/prod-api'
VUE_APP_BASE_API = '/prod-api'
# 打包:
# npm run build:prod

View File

@ -42,7 +42,16 @@ module.exports = {
warnings: false,
errors: true
},
before: require('./mock/mock-server.js')
proxy: {
'/prod-api': {
target: 'http://t-mana.beida413.com',
changeOrigin: true
// pathRewrite: {
// '^/prod-api': ''
// }
}
}
// before: require('./mock/mock-server.js')
},
configureWebpack: {
// provide the app's title in webpack's name field, so that