May 17, 2021 WeChat Mini Program Development Document
A small program contains an app that describes the overall program and multiple pages that describe their respective pages.
A small program body consists of three files that must be placed at the root of the project, as follows:
File | Necessary | Role |
---|---|---|
app.js | Is | Small program logic |
app.json | Is | The common configuration of the small program |
app.wxss | Whether | Small program public style sheet |
A small program page consists of four files:
The file type | Necessary | Role |
---|---|---|
Js | Is | Page logic |
wxml | Is | The page structure |
Json | Whether | The page configuration |
wxss | Whether | The page style sheet |
Note: In order for developers to reduce configuration items, the four files that describe the page must have the same path and file name.
In the project directory, the following files are compiled so that they cannot be accessed directly after upload: .js, app.json, .wxml, .wxss (where wxml, and wxs files are only for pages configured in app.json). I n addition, only files with suffix names in the whitelist can be uploaded, and files that are not on the whitelist list can be accessed in the development tool, but not uploaded. The list of specific whitelists is as follows: