Platform

Export To WechatMiniGame

Platform Configuration Instructions

When exporting to the WeChat Mini Game platform, there are the following configuration items:

ConfigurationDescribeCorresponding to the configuration file of WeChat Mini GamesCorresponding to the fields in WeChat Mini Games
AppIdAppId of WeChat Mini Game, required. The wxdf8199565c509fb9 in the screenshot is a test account.project.config.jsonappid
OrientationSet the game screen orientation: Landscape, Portraitgame.jsondeviceOrientation
Requestwx.request timeout, unit: millisecondsgame.jsonnetworkTimeout.request
Connect Socketwx.connectSocket timeout, unit: millisecondsgame.jsonnetworkTimeout.connectSocket
Upload Filewx.uploadFile timeout, unit: millisecondsgame.jsonnetworkTimeout.uploadFile
Download Filewx.downloadFile timeout, unit: millisecondsgame.jsonnetworkTimeout.downloadFile

For more configuration details, see: project.config.jsongame.json

Export

After selecting the WeChat Mini Game platform, click the download button at the bottom of the export panel to export the required project:

Debug

1、After exporting the project to the local computer, first go to the root directory and execute the following command to install the dependent packages:

npm i

2、Open WeChat Developer Tools, select Mini Game, and import the project just now, as follows:

3、In WeChat Developer Tools, click Tools->Build npm, as follows:

4、After completing the above 3, you can preview the final result in the WeChat developer tool as follows:

5、For debugging in WeChat developer tools, see: WeChat Mini Game Debugging

Publish

After local debugging is completed, you can publish it. For details on the publishing process, see: WeChat Mini Games Publish

Export Project Directory Description

The project directory exported to the local is as follows:

Project Catalog Description

Directory or fileDescribe
adaptersEngine-related packages used in the project, exported on demand
publicAsset directory. All assets of the editor are exported to this directory. The path of the asset is /public/xxx
scriptsAfter the script components added by the developer in the editor are exported to the local computer, the developer can perform secondary development in the script components inside.
game.jsonCorresponding to the requirements of WeChat mini-game projects game.json
game.tsEntry file, the initialization logic is placed here
package.jsonMainly store project dependency packages
polyfill.jsDevelopers do not need to worry about platform DOM adaptation code and global variable adaptation code
project.config.jsonCorresponding to the requirements of WeChat mini-game projects project.config.json
project.tsGalacean project files are parsed during initialization

Was this page helpful?