AI Built the Game, WeChat Rejected It: Cocos Subpackage Setup for the 4 MB Limit
A Cocos WeChat mini game that crosses the 4 MB main-package ceiling cannot be uploaded until the build is split. Subpackage and remote Bundle configuration are the standard fixes, and neither changes total asset size.
WeChat mini games have a hard upload constraint: the main package must stay within 4 MB. One AI-assisted Cocos project had a main package of 4.02 MB and was rejected at upload. Moving it into subpackages does not shrink the game; the build splits into a main package plus subpackages, total size stays the same, and the startup package fits the limit.
Cocos Creator handles this through Asset Bundles. The built-in resources folder is already a Bundle and cannot be unmarked. Any other folder can be configured as a Bundle and then assigned as a WeChat subpackage in the build settings. After export, the build contains a main package and a subpackage, and the upload goes through.
Games that outgrow even the subpackage scheme can move Bundles to a server. A folder marked as a Bundle and built separately can be loaded at runtime with assetManager.loadBundle('https://...'), then a scene starts through bundle.loadScene and director.runScene. Asset optimization belongs before subpackaging; that topic is left aside.
Subpackaging keeps total size unchanged; it only moves bytes out of the initial download, so the 4 MB rule governs startup payload, not game size.
AI-assisted development does not exempt a project from platform packaging rules; a game generated with AI still needs build configuration such as Bundle markers and subpackage assignment before it can ship.