赞
踩
小程序项目更新迭代,代码越来越大,超过了2M,小程序不能发布
原来app.json内容
{
"pages": [
"pages/ucenter/feedback/feedback",
"pages/ucenter/collect/collect"
]
}
修改后app.json内容
{
"pages": [
],
"subPackages": [
{"root": "pages/ucenter/feedback/", "pages": ["feedback"]},
{"root": "pages/ucenter/collect/", "pages": ["collect"]}
]
}
代码目录结构
app.json内容
{ "pages": [], "subPackages": [{ "root": "orderPages", "pages": [{ "path": "pages/jiaoyi/pay-result", "style": { "navigationBarTitleText": "支付" } }, { "path": "pages/jiaoyi/order", "style": { "navigationBarTitleText": "订单" } }, { "path": "pages/jiaoyi/tihuo-list", "style": { "navigationBarTitleText": "提货列表" } } ] } ] }
代码目录结构
这里面的orderPages所在位置与pages目录是同级的,这样就可以把需要分包的页面都放在一个包下面
赞
踩
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。