Project Configuration File
You can use the project.config.json
file in the project root directory to configure the project.
Configuration Items
Property | Type | Default Value | Required | Description |
---|---|---|---|---|
packOptions | Object | - | - | Package configuration options |
packOptions
packOptions
is used to configure the options of project packaging. Packaging is a necessary step for previewing and uploading a project.
You can use the packOptions.ignore
field to specify the filter rules. The files or folders that match the rules will be ignored when the project is packaged, and they will not appear in the preview or upload results.
packOptions.ignore
is an array of objects with the following element types:
Property | Type | Default Value | Required | Description |
---|---|---|---|---|
value | String | ✓ | ✓ | Path or value |
type | String | ✓ | ✓ | Type |
Available values of type include folder
, file
, suffix
, prefix
, regexp
, and glob
, respectively corresponding to folders, files, suffixes, prefixes, regular expressions, and Glob rules. All values are case-insensitive.
Below is a configuration example.
// project.config.json
{
"packOptions": {
"ignore": [
{
"type": "file",
"value": "utils.bxs"
},
{
"type": "folder",
"value": "image"
},
{
"type": "suffix",
"value": ".LICENSE.txt"
},
{
"type": "suffix",
"value": ".css"
},
{
"type": "prefix",
"value": "rich-"
},
{
"type": "glob",
"value": "pages/API/**/*.js"
},
{
"type": "regexp",
"value": "index\\.js$"
}
]
}
// ...
}