AppSubpackages
- 分包处理
使用示例
useReducer({
AppSubpackages (node, store) {
if (node.body.json) {
// process subpackages
}
}
});
编译结果示例
- 编译前
{
"subpackages": [
{
"root": "packageA",
"pages": [
"pages/cat",
"pages/dog"
]
}, {
"root": "packageB",
"name": "pack2",
"pages": [
"pages/apple",
"pages/banana"
]
}
]
}
- 编译后
{
"subPackages": [
{
"root": "packageA",
"pages": [
"pages/page1",
"pages/page2"
]
},
{
"root": "packageB",
"pages": [
"pages/page3",
"pages/page4"
]
}
]
}