Mutual reference rules for WeChat applet main package and subcontracted resources

WeChat subcontracting documents

 

The document only mentions the reference relationship between subcontracting sibling subcontracting and the main package, but does not mention whether the main package can reference subcontracting resources. In fact, you only need to understand two points:

The first point: Subpackaging is always loaded asynchronously

Second point: The main package can preload sub-packages

In fact, it is already obvious here. If you want the main package to use subcontracted resources, then when calling the resources, make sure that the subpackaged resources have been preloaded.

Example: On the tabbar home page, call a function of the packageA package. Then you need to configure preloading

Then whether the next call is successful depends on how fast the user's mobile phone loads the subpackage.

Guess you like

Origin blog.csdn.net/m0_57033755/article/details/134325506