vue-cli配置UAT环境
2022-02-11 本文已影响0人
qjsxq
第一步新建.env.uat
NODE_ENV=production
# 环境变量
VUE_APP_ENV = uat
# 当前请求域名
VUE_APP_BASE_URL = https://uat-hn-gateway.meditrusthealth.com
VUE_APP_WEACHT_URL = https://uat-universal.meditrusthealth.com
VUE_APP_ROOM_URL = https://uat-hn-im-cp.meditrusthealth.com
VUE_APP_HISTORY_URL = https://uat-hn-api-im.meditrusthealth.com/api/message/history
# 域名
VUE_APP_ROOT= https://uat-hn-wechat.meditrusthealth.com/hospital
# 配置公共资源路径
VUE_APP_ALI_URL = https://test-static.meditrusthealth.com
-
二、在package.json 添加 命令
"scripts": {
"start": "vue-cli-service serve --port 8090 --mode development --open",
"serve": "vue-cli-service serve",
"build": "vue-cli-service build --mode production",
#UAT
"uat": "vue-cli-service build --mode uat",
"build:report": "vue-cli-service build --report",
"lint": "vue-cli-service lint"
},
三、
npm run uat