官网
根据官网的意思是将 "lazyCodeLoading": "requiredComponents"
配置写在 pages.json
文件中
例如:
{"pages": [{"path": "pages/index/index","style": {"navigationBarTitleText": "首页"},"lazyCodeLoading": "requiredComponents" // 将 lazyCodeLoading 配置添加到页面配置中},{"path": "pages/about/about","style": {"navigationBarTitleText": "关于"}}],"globalStyle": {"navigationBarTextStyle": "black"},"lazyCodeLoading": "requiredComponents" // 或者将 lazyCodeLoading 配置添加到全局配置中
}