tencent cloud

All product documents
Tencent Cloud Super App as a Service
Project Configuration
Last updated: 2025-03-20 18:01:55
Project Configuration
Last updated: 2025-03-20 18:01:55
The project.config.json file in the project root directory allows you to configure the project.
The project.config.json file is mainly used in mini programs to configure the behaviour and characteristics of the mini program development tool. This file allows developers to adjust some of the default settings of the development tool to better suit the development process and environment.

configuration item

attribute
type
describe
Path String
Specify the directory of the source code of the mini program (must be a relative path).
String
Compile type, default is miniprogram.
String
The appid of the project.
String
Project name
setting
Object
Project setting
String
Base library version
condition
Object
Conditional Compilation Configuration
Object
IDE mockAPI Configuration

miniprogramRoot

The directory of the mini program source code (needs to be a relative path).
{
"miniprogramRoot": "./src"
}

compileType

Compile type, defaults to miniprogram.
{
"compileType": "miniprogram"
}

[xxx]appid

The appId corresponding to the mini program on the product console, xxx represents the product name.
{
"[xxx]appid": "mpz5g4hpzd5p3k2l"
}

projectname

Project Title.
{
"projectname": "main-demo"
}

setting

You can specify the following settings for the compilation settings of the project.
The following fields can be found in Developer Tools > Details > Local Settings.

attribute
type
describe
es6
Boolean
Whether to enable es6 to es5 conversion
postcss
Boolean
Whether to auto-complete the style when uploading code
minified
Boolean
If or not the script file will be automatically compressed when uploading code.
uglifyFileName
Boolean
Protect code when uploading
urlCheck
Boolean
Whether to check secure domain name and TLS version and HTTPS certificate

libVersion

The version number of the base library currently in use.
{
"libVersion": "1.5.0"
}

condition

Corresponds to the conditional compilation information set on the IDE.

{
"condition": {
"miniprogram": {
"current": 0,
"list": [
{
"id": 0,
"name": "tab3",
"pathName": "page/extend/index",
"query": "",
"scene": null
},
{
"id": -1,
"name": "tab4",
"pathName": "page/extend/index",
"query": "name=1",
"scene": null
}
]
}
}
}

mockConfig

Configuration information that is automatically generated when the corresponding project mocks the API in the IDE debug panel.

{
"globalOpen": true,
"rules": [
{
"ruleName": "testApi",
"ruleId": "48b83a70-84fd-400d-b53d-097518cfa515",
"apiName": "invokeNativePlugin",
"enable": true,
"mockType": "API",
"returnType": "succ",
"resStr": "{\\n\\"name\\": 1,\\n\\"cvv\\": 2,\\n\\"ccdd\\": \\"c223344\\"\\n}",
"filterList": [
{
"propName": "api_name",
"propRegString": "testApi",
"matchType": "string"
},
{
"propName": "",
"propRegString": "",
"matchType": "string"
}
],
"verifyFail": false
}
]
}

Was this page helpful?
You can also Contact Sales or Submit a Ticket for help.
Yes
No

Feedback

Contact Us

Contact our sales team or business advisors to help your business.

Technical Support

Open a ticket if you're looking for further assistance. Our Ticket is 7x24 available.

7x24 Phone Support
Hong Kong, China
+852 800 906 020 (Toll Free)
United States
+1 844 606 0804 (Toll Free)
United Kingdom
+44 808 196 4551 (Toll Free)
Canada
+1 888 605 7930 (Toll Free)
Australia
+61 1300 986 386 (Toll Free)
EdgeOne hotline
+852 300 80699
More local hotlines coming soon