当前位置:网站首页>Uniapp static file is too large solution
Uniapp static file is too large solution
2022-08-06 05:02:00 【Developer MK】
1.Enable subcontracting optimization in manifest.json"app-plus": {"optimization": {"subPackages": true},"runmode" : "liberate" // After subcontracting optimization is enabled, resource release mode must be configured}2.Put static files static on pages/thunder/foredirectoryThe uniapp official website has an introduction: https://uniapp.dcloud.net.cn/collocation/manifest.html3.Add subcontracting module in pages.json"subPackages": [{"root": "pages/thunder/fore","pages": [{"path": "forecast"}]}],4.A description of subcontracting optimizationAdd "optimization":{"subPackages":true} enable subcontracting optimizationCurrently only supports mp-weixin, mp-qq, mp-Subcontracting optimization of span>baidu, mp-toutiaoThe specific logic of subcontracting optimization:Static files: Under subcontracting, copying of static resources such as static is supported, that is, static resources placed in the subcontracting directory will not be packaged into the main package, nor can they be placed in the main package.usejs file: When a js is only referenced by one sub-package, the js will be packaged into the sub-package, otherwise it will still be sent to the main package (that is, referenced by the main package, or by more than 1 subcontract references)Custom component: If a custom component is only referenced by one sub-package and is not placed in the sub-package, a prompt message will be output when compiling边栏推荐
猜你喜欢
随机推荐
旁路缓存策略的缓存一致性问题?
“模组+天线”全栈解决方案,提速物联网终端高效部署
Datax及Datax-web 下载使用
5. redux
使用 Monaco Editor 开发一个 SQL 编辑器
数据库基础
Clion设置toolchains报错
重发布中的路由策略:
OSPF综合实验:
Flink-cdc synchronizes mysql data
Cloudflare CDN(泛播)支持转发的网络端口
golang handles variable templates
[Binary tree] The number of nodes whose statistical value is equal to the average value of the subtree
实用调试小技巧
【C语言数组下标越界】数组下标越界引发的死循环
如何保持注意力,高效学习
SequoiaDB分布式数据库2022.7月刊
YGG 与《元素突击》的创造者游戏平台 G4AL 达成合作
Clion sets toolchains error
The difference between defineProperty and proxy









