当前配置
版本
{
"@dcloudio/uni-app-plus": "^2.0.0-26920200403001",
"@dcloudio/uni-h5": "^2.0.0-26920200403001",
"@dcloudio/uni-helper-json": "*",
"@dcloudio/uni-mp-alipay": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-baidu": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-qq": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-toutiao": "^2.0.0-26920200403001",
"@dcloudio/uni-mp-weixin": "^2.0.0-26920200403001",
"@dcloudio/uni-stat": "^2.0.0-26920200403001",
}
自定义平台配置
package.json
"uni-app": {
"scripts": {
"h5-weixin": {
"title":"微信服务号",
"BROWSER":"Chrome",
"env": {
"UNI_PLATFORM": "h5"
},
"define": {
"H5-WEIXIN": true
}
}
}
}
自定义h5的template配置
mainfest.json
"h5": {
"title": "H5 - Page",
"template": "../public/h5.html"
},
需求
当前项目需要发布到H5端和自定义的H5-WEIXIN端;
在自定义的H5-WEIXIN端需要使用与H5端不同的template配置,比如使用配置 ../public/h5-weixin.html;
求指导
发现在template配置项对应的文件中不支持条件编译,求指导还有什么办法能实现基于H5平台的自定义平台编译时使用不同的template?
感谢