我的包结构如下:
"pages": [
"pages/catalog/catalog",
"pages/category/category"
],
"subPackages":[
{
"root": "shopping",
"pages": [
...
]
}, {
"root": "my",
"pages": [
...
]
}
],
"preloadRule": {
"pages/catalog/catalog": {
"network": "all",
"packages": ["shopping", "my"]
},
"pages/category/category": {
"network": "all",
"packages": ["shopping", "my"]
}
}
加载pages/catalog/catalog时,会预加载两个包,从pages/catalog/catalog跳到pages/category/category,在开发工具里看到又预加载了那两个包,也就是说,象我这样写法会重复预加载两个包?预加载的包只须加载一次就好了?
应该不用担心,走的资源请求,重复请求直接302读本地缓存的.