tencent cloud

Feedback

Project Configuration

Last updated: 2024-07-12 18:29:49
    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"
    }

    TCMPPappid

    The appId corresponding to the mini program on the TCMPP console.
    {
    "TCMPPappid": "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
    }
    ]
    }
    
    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 avaliable.

    7x24 Phone Support