‘liusuyi’
2023-05-25 c6eb731b0a70946e5ba265d9e5d427b8bb4537a6
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
{
  "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.",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "include": {
      "description": "Include all assets matching any of these conditions.",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "exclude": {
      "description": "Exclude all assets matching any of these conditions.",
      "oneOf": [
        {
          "$ref": "#/definitions/Rules"
        }
      ]
    },
    "algorithm": {
      "description": "The compression algorithm/function.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "instanceof": "Function"
        }
      ]
    },
    "compressionOptions": {
      "description": "Compression options for `algorithm`.",
      "additionalProperties": true,
      "type": "object"
    },
    "threshold": {
      "description": "Only assets bigger than this size are processed. In bytes.",
      "type": "number"
    },
    "minRatio": {
      "description": "Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`).",
      "type": "number"
    },
    "deleteOriginalAssets": {
      "description": "Whether to delete the original assets or not.",
      "type": "boolean"
    },
    "filename": {
      "description": "The target asset filename.",
      "anyOf": [
        {
          "type": "string"
        },
        {
          "instanceof": "Function"
        }
      ]
    },
    "cache": {
      "description": "Enable file caching. Ignored in webpack 5, for webpack 5 please use https://webpack.js.org/configuration/other-options/#cache.",
      "anyOf": [
        {
          "type": "boolean"
        },
        {
          "type": "string"
        }
      ]
    }
  },
  "type": "object"
}