You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
122 lines
3.2 KiB
122 lines
3.2 KiB
{
|
|
"type": "object",
|
|
"additionalProperties": false,
|
|
"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"
|
|
}
|
|
]
|
|
}
|
|
},
|
|
"properties": {
|
|
"test": {
|
|
"description": "Include all assets that pass test assertion.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#test",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/definitions/Rules"
|
|
}
|
|
]
|
|
},
|
|
"include": {
|
|
"description": "Include all assets matching any of these conditions.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#include",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/definitions/Rules"
|
|
}
|
|
]
|
|
},
|
|
"exclude": {
|
|
"description": "Exclude all assets matching any of these conditions.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#exclude",
|
|
"oneOf": [
|
|
{
|
|
"$ref": "#/definitions/Rules"
|
|
}
|
|
]
|
|
},
|
|
"algorithm": {
|
|
"description": "The compression algorithm/function.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#algorithm",
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"instanceof": "Function"
|
|
}
|
|
]
|
|
},
|
|
"compressionOptions": {
|
|
"description": "Compression options for `algorithm`.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#compressionoptions",
|
|
"additionalProperties": true,
|
|
"type": "object"
|
|
},
|
|
"threshold": {
|
|
"description": "Only assets bigger than this size are processed. In bytes.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#threshold",
|
|
"type": "number"
|
|
},
|
|
"minRatio": {
|
|
"description": "Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`).",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#minratio",
|
|
"type": "number"
|
|
},
|
|
"deleteOriginalAssets": {
|
|
"description": "Whether to delete the original assets or not.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#deleteoriginalassets",
|
|
"anyOf": [
|
|
{
|
|
"type": "boolean"
|
|
},
|
|
{
|
|
"instanceof": "Function"
|
|
},
|
|
{
|
|
"enum": ["keep-source-map"]
|
|
}
|
|
]
|
|
},
|
|
"filename": {
|
|
"description": "The target asset filename.",
|
|
"link": "https://github.com/webpack/compression-webpack-plugin/#filename",
|
|
"anyOf": [
|
|
{
|
|
"type": "string"
|
|
},
|
|
{
|
|
"instanceof": "Function"
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
|