vue-cli配置UAT环境

第一步新建.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
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容