uniapp:h5多环境配置;
第一步:在终端运行 npm init -y 初始化package.json
{
"name": "filter_statistics",
"version": "1.0.0",
"description": "",
"main": "main.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"uni-app": {
"scripts": {
"h5dev": {
"title": "h5开发版",
"browser": "chrome",
"env": {
"UNI_PLATFORM": "h5",
"ENV": "dev",
"VUE_APP_BASE_URL": "http://172.16.0.54:8092"
},
"define": {
"H5-DEV": true
}
},
"h5test": {
"title": "h5测试版",
"browser": "chrome",
"env": {
"UNI_PLATFORM": "h5",
"VUE_APP_BASE_URL": "http://61.144.120.230:50005",
"ENV": "test"
},
"define": {
"H5-TEST": true
}
},
"h5prod": {
"title": "h5生产版",
"browser": "chrome",
"env": {
"UNI_PLATFORM": "h5",
"VUE_APP_BASE_URL": "http://screening.sxftech.com",
"ENV": "prod"
},
"define": {
"H5-PROD": true
}
}
}
}
}