152 lines
3.3 KiB
JSON
152 lines
3.3 KiB
JSON
|
{
|
||
|
"definitions": {
|
||
|
"Rule": {
|
||
|
"description": "Filtering rule as regex or string.",
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"instanceof": "RegExp",
|
||
|
"tsType": "RegExp"
|
||
|
},
|
||
|
{
|
||
|
"type": "string",
|
||
|
"minLength": 1
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"Rules": {
|
||
|
"description": "Filtering rules.",
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "array",
|
||
|
"items": {
|
||
|
"description": "A rule condition.",
|
||
|
"oneOf": [
|
||
|
{
|
||
|
"$ref": "#/definitions/Rule"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
{
|
||
|
"$ref": "#/definitions/Rule"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"title": "TerserPluginOptions",
|
||
|
"type": "object",
|
||
|
"additionalProperties": false,
|
||
|
"properties": {
|
||
|
"test": {
|
||
|
"description": "Include all modules that pass test assertion.",
|
||
|
"oneOf": [
|
||
|
{
|
||
|
"$ref": "#/definitions/Rules"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"include": {
|
||
|
"description": "Include all modules matching any of these conditions.",
|
||
|
"oneOf": [
|
||
|
{
|
||
|
"$ref": "#/definitions/Rules"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"exclude": {
|
||
|
"description": "Exclude all modules matching any of these conditions.",
|
||
|
"oneOf": [
|
||
|
{
|
||
|
"$ref": "#/definitions/Rules"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"terserOptions": {
|
||
|
"description": "Options for `terser`.",
|
||
|
"additionalProperties": true,
|
||
|
"type": "object"
|
||
|
},
|
||
|
"extractComments": {
|
||
|
"description": "Whether comments shall be extracted to a separate file.",
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
{
|
||
|
"type": "string",
|
||
|
"minLength": 1
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "RegExp"
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "Function"
|
||
|
},
|
||
|
{
|
||
|
"additionalProperties": false,
|
||
|
"properties": {
|
||
|
"condition": {
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
{
|
||
|
"type": "string",
|
||
|
"minLength": 1
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "RegExp"
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "Function"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"filename": {
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "string",
|
||
|
"minLength": 1
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "Function"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"banner": {
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
{
|
||
|
"type": "string",
|
||
|
"minLength": 1
|
||
|
},
|
||
|
{
|
||
|
"instanceof": "Function"
|
||
|
}
|
||
|
]
|
||
|
}
|
||
|
},
|
||
|
"type": "object"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"parallel": {
|
||
|
"description": "Use multi-process parallel running to improve the build speed.",
|
||
|
"anyOf": [
|
||
|
{
|
||
|
"type": "boolean"
|
||
|
},
|
||
|
{
|
||
|
"type": "integer"
|
||
|
}
|
||
|
]
|
||
|
},
|
||
|
"minify": {
|
||
|
"description": "Allows you to override default minify function.",
|
||
|
"instanceof": "Function"
|
||
|
}
|
||
|
}
|
||
|
}
|