May 20, 2021 WeChat Mini Program Development Document
The appID of a small program can create a small plug-in project, which is independent of a small program, but the appID is common, so don't use the original applet project for plug-in development. On the Create Project page, select an empty folder as the project path, and you can choose to create a small plug-in to quickly launch the template
Quick start template description:
If it is a previously created plug-in project, it can be opened directly in the list of projects;
If you re-create the project and select a non-empty directory, you will need project.config.json details in this non-empty directory to ensure that the following fields are available in this file:
{
"miniprogramRoot": "./miniprogram",
"pluginRoot": "./plugin",
"compileType": "plugin"
}
During project development, you can manually modify the compileType field of the project.config.json file to switch the compilation type of the project.
Before uploading the plug - in code, you need to specify the version number in the format of the number. D igital. number, with a maximum of 999 per number.
Each submission version number needs to be incremental, plug-in consumers will use this version number, please fill in carefully.
When you upload a plug-in, the contents of the directory specified by miniprogramRoot in project.config.json are also uploaded as plug-ins using Demo, which needs to be overwritten to all use scenarios of the plug-in for plug-in review
You can declare the use of plug-ins in the plugins field of app.json for a small program project. If the current compilation type is a small program, you need to specify the version number of the published plug-in, and the developer tool pulls the corresponding version of the plug-in based on the version number to compile it.
The version number of the plug-in can only be 'dev' if the compileType of project.config.json is 'plugin'