当前位置:网站首页>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.
边栏推荐
- Operator < <> > fool test case
- Wechat applet scroll view component scrollable view area
- Fundamentals of SQL database operation
- [network data transmission] FPGA based development of 100M / Gigabit UDP packet sending and receiving system, PC to FPGA
- JS common time processing functions
- Cervical vertebra, beriberi
- [FPGA tutorial case 7] design and implementation of counter based on Verilog
- Uniapp custom environment variables
- 2022, peut - être la meilleure année économique de la prochaine décennie, avez - vous obtenu votre diplôme en 2022? Comment est - ce prévu après la remise des diplômes?
- Matlab remainder
猜你喜欢

R statistical mapping - random forest classification analysis and species abundance difference test combination diagram

The cloud native programming challenge ended, and Alibaba cloud launched the first white paper on application liveliness technology in the field of cloud native

MySQL 45 lecture learning notes (VII) line lock

R统计绘图-随机森林分类分析及物种丰度差异检验组合图

2022 Xinjiang's latest eight members (Safety Officer) simulated examination questions and answers

响应式——媒体查询

双色球案例

About how idea sets up shortcut key sets

校园网络问题

centos8安装mysql.7 无法开机启动
随机推荐
双色球案例
tars源码分析之9
What is tweeman's law?
what the fuck! If you can't grab it, write it yourself. Use code to realize a Bing Dwen Dwen. It's so beautiful ~!
2022年,或许是未来10年经济最好的一年,2022年你毕业了吗?毕业后是怎么计划的?
Selection (022) - what is the output of the following code?
The sorting in C language realizes the number sorting method from small to large
2022年,或許是未來10年經濟最好的一年,2022年你畢業了嗎?畢業後是怎麼計劃的?
Analysis of tars source code 1
Selection (021) - what is the output of the following code?
P26-P34 third_ template
Another company raised the price of SAIC Roewe new energy products from March 1
7. Agency mode
What is Gibson's law?
Tar source code analysis Part 3
How does the recv of TCP socket receive messages of specified length?
Variables d'environnement personnalisées uniapp
Tar source code analysis 9
R统计绘图-随机森林分类分析及物种丰度差异检验组合图
MySQL relearn 2- Alibaba cloud server CentOS installation mysql8.0