码迷,mamicode.com
首页 > 移动开发 > 详细

uniapp 分包加载

时间:2020-07-14 18:24:04      阅读:304      评论:0      收藏:0      [点我收藏+]

标签:加载   root   col   文件中   package   adr   nbsp   sub   code   

pages.json文件中与pages同级

 

{
    "pages": [{
        "path": "pages/index/index",
        "style": { ...}
    }, {
        "path": "pages/login/login",
        "style": { ...}
    }],
    "subPackages": [{
        "root": "pagesA",
        "pages": [{
            "path": "list/list",
            "style": { ...}
        }]
    }, {
        "root": "pagesB",
        "pages": [{
            "path": "detail/detail",
            "style": { ...}
        }]
    }],
    "preloadRule": {
        "pagesA/list/list": {
            "network": "all",
            "packages": ["__APP__"]
        },
        "pagesB/detail/detail": {
            "network": "all",
            "packages": ["pagesA"]
        }
    }
}

 

uniapp 分包加载

标签:加载   root   col   文件中   package   adr   nbsp   sub   code   

原文地址:https://www.cnblogs.com/zjxiang008/p/13300239.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!