I would like to ask WeChat Mini Programs how to take apart the bloated single-page js file and write it into multiple

because some pages have very complex functions
the result code has more than 3000 lines of code that are confused every time I modify it.

there is an article about how to disassemble https://www.jianshu.com/p/4b2., but I don"t understand

.

how do you open it?

Mar.28,2021

you can use custom components to extract some functional logic.


consider using https://tencent.github.io/wepy/


you can see the component tutorial documentation on the official website: https://developers.weixin.qq.

.

in addition to extracting components, extract some request logic and tool logic into a file, and then use require to introduce

Menu