当前位置:网站首页>Uniapp applet subcontracting
Uniapp applet subcontracting
2022-07-04 06:45:00 【Like angels】
uniapp Applet subcontracting
Subcontracting reasons : Because the total volume of wechat small package cannot exceed 2M, At this time, you need to subcontract the code .
Main package : That is, the default startup page /TabBar page , And some public resources are required for all subcontracts /JS Script ; Subcontracting is based on pages.json The configuration of .
The size of each subcontract after subcontracting is 2M within , The total volume cannot exceed 20M.
subPackages: Subcontract load configuration , This configuration is the subcontracting loading mechanism for applets , Please refer to uniapp Official website subcontracting mechanism
The project directory structure is as follows :
Need to be in pages.json Code subcontracting in :
{
"pages": [{
"path": "pages/index/index",
"style": {
...} // Configuration page
}],
"subPackages": [{
"root": "pagesA",
"pages": [{
"path": "punchCard/index",
"style": {
...}
}]
}, {
"root": "pagesB",
"pages": [{
"path": "collectInfo/index",
"style": {
...}
}]
} // Other subcontracting will be added later
],
"preloadRule": {
// Subcontract preload configuration
"pagesA/index/index": {
"network": "all",
"packages": ["__APP__"]
},
"pagesB/punchCard/index": {
"network": "all",
"packages": ["pagesA"]
}
}
}
preloadRule: To configure preloadRule after , When entering a page of the applet , The framework automatically pre downloads the subcontracts that may be required , Increase the startup speed when entering the subsequent subcontracting page , Please refer to uniapp Official website subcontracting preload configuration
There is no fate but what we make for ourselves.
边栏推荐
- Appium基础 — APPium安装(二)
- Mysql 45讲学习笔记(十四)count(*)
- 在已经知道表格列勾选一个显示一列
- Realize IIC data / instruction interaction with micro batg135
- [backpack DP] backpack problem
- Wechat applet scroll view component scrollable view area
- 内卷怎么破?
- Tar source code analysis 9
- Tar source code analysis 8
- [FPGA tutorial case 8] design and implementation of frequency divider based on Verilog
猜你喜欢
【网络数据传输】基于FPGA的百兆网/兆网千UDP数据包收发系统开发,PC到FPGA
Fundamentals of SQL database operation
[problem record] 03 connect to MySQL database prompt: 1040 too many connections
R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
Appium基础 — APPium安装(二)
Mobile adaptation: vw/vh
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
selenium驱动IE常见问题解决Message: Currently focused window has been closed.
uniapp小程序分包
GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
随机推荐
2022 wechat enterprise mailbox login entry introduction, how to open and register enterprise wechat enterprise mailbox?
[FPGA tutorial case 8] design and implementation of frequency divider based on Verilog
GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
MySQL 45 learning notes (XI) how to index string fields
图的底部问题
How does the inner roll break?
Download kicad on Alibaba cloud image station
tars源码分析之9
Overview of convolutional neural network structure optimization
How does the recv of TCP socket receive messages of specified length?
JS common time processing functions
响应式——媒体查询
Realize IIC data / instruction interaction with micro batg135
11. Dimitt's law
期末周,我裂开
The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
关于IDEA如何设置快捷键集
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
tars源码分析之3
请问旧版的的常用SQL怎么迁移到新版本里来?