当前位置:网站首页>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.
边栏推荐
- 11. Dimitt's law
- Tar source code analysis 9
- The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native
- R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
- GoogleChromePortable 谷歌chrome浏览器便携版官网下载方式
- 雲原生——上雲必讀之SSH篇(常用於遠程登錄雲服務器)
- 24 magicaccessorimpl can access the debugging of all methods
- tars源码分析之4
- Inputstream/outputstream (input and output of file)
- tars源码分析之10
猜你喜欢
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
R statistical mapping - random forest classification analysis and species abundance difference test combination diagram
2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers
Wechat applet scroll view component scrollable view area
Shopping malls, storerooms, flat display, user-defined maps can also be played like this!
Native Cloud - SSH articles must be read on Cloud (used for Remote Login to Cloud Server)
[backpack DP] backpack problem
About how idea sets up shortcut key sets
响应式——媒体查询
[GF (q) + LDPC] regular LDPC coding and decoding design and MATLAB simulation based on the GF (q) field of binary graph
随机推荐
Mysql 45讲学习笔记(十三)表数据删掉一半,表文件大小不变
Tar source code analysis Part 2
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0
Stc8h development (XII): I2C drive AT24C08, at24c32 series EEPROM storage
在已经知道表格列勾选一个显示一列
MySQL 45 learning notes (XI) how to index string fields
【问题记录】03 连接MySQL数据库提示:1040 Too many connections
Code rant: from hard coding to configurable, rule engine, low code DSL complexity clock
centos8安装mysql.7 无法开机启动
运算符<< >>傻瓜式测试用例
Common usage of time library
Mysql 45讲学习笔记(七)行锁
[backpack DP] backpack problem
Shopping malls, storerooms, flat display, user-defined maps can also be played like this!
tars源码分析之6
[number theory] fast power (Euler power)
雲原生——上雲必讀之SSH篇(常用於遠程登錄雲服務器)
图的底部问题
Selection (021) - what is the output of the following code?
Analysis of tars source code 1