Project Configuration File
You can use the project.config.json
file in the project root directory to configure the project.
#
Configuration ItemsProperty | Type | Default Value | Required | Description |
---|---|---|---|---|
miniprogramRoot | String | - | ✓ | Specifies the directory (a relative path) of the Mini Program source code |
packOptions | Object | - | - | Package configuration options |
#
packOptionspackOptions
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.
Note: If the value of the value field indicates a file or folder path, the root directory is the Mini Program directory (
miniprogramRoot
).
Below is a configuration example.