1 | {
|
2 | "type": "object",
|
3 | "additionalProperties": false,
|
4 | "definitions": {
|
5 | "Rule": {
|
6 | "description": "Filtering rule as regex or string.",
|
7 | "anyOf": [
|
8 | {
|
9 | "instanceof": "RegExp",
|
10 | "tsType": "RegExp"
|
11 | },
|
12 | {
|
13 | "type": "string",
|
14 | "minLength": 1
|
15 | }
|
16 | ]
|
17 | },
|
18 | "Rules": {
|
19 | "description": "Filtering rules.",
|
20 | "anyOf": [
|
21 | {
|
22 | "type": "array",
|
23 | "items": {
|
24 | "description": "A rule condition.",
|
25 | "oneOf": [
|
26 | {
|
27 | "$ref": "#/definitions/Rule"
|
28 | }
|
29 | ]
|
30 | }
|
31 | },
|
32 | {
|
33 | "$ref": "#/definitions/Rule"
|
34 | }
|
35 | ]
|
36 | }
|
37 | },
|
38 | "properties": {
|
39 | "test": {
|
40 | "description": "Include all assets that pass test assertion.",
|
41 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#test",
|
42 | "oneOf": [
|
43 | {
|
44 | "$ref": "#/definitions/Rules"
|
45 | }
|
46 | ]
|
47 | },
|
48 | "include": {
|
49 | "description": "Include all assets matching any of these conditions.",
|
50 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#include",
|
51 | "oneOf": [
|
52 | {
|
53 | "$ref": "#/definitions/Rules"
|
54 | }
|
55 | ]
|
56 | },
|
57 | "exclude": {
|
58 | "description": "Exclude all assets matching any of these conditions.",
|
59 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#exclude",
|
60 | "oneOf": [
|
61 | {
|
62 | "$ref": "#/definitions/Rules"
|
63 | }
|
64 | ]
|
65 | },
|
66 | "algorithm": {
|
67 | "description": "The compression algorithm/function.",
|
68 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#algorithm",
|
69 | "anyOf": [
|
70 | {
|
71 | "type": "string"
|
72 | },
|
73 | {
|
74 | "instanceof": "Function"
|
75 | }
|
76 | ]
|
77 | },
|
78 | "compressionOptions": {
|
79 | "description": "Compression options for `algorithm`.",
|
80 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#compressionoptions",
|
81 | "additionalProperties": true,
|
82 | "type": "object"
|
83 | },
|
84 | "threshold": {
|
85 | "description": "Only assets bigger than this size are processed. In bytes.",
|
86 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#threshold",
|
87 | "type": "number"
|
88 | },
|
89 | "minRatio": {
|
90 | "description": "Only assets that compress better than this ratio are processed (`minRatio = Compressed Size / Original Size`).",
|
91 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#minratio",
|
92 | "type": "number"
|
93 | },
|
94 | "deleteOriginalAssets": {
|
95 | "description": "Whether to delete the original assets or not.",
|
96 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#deleteoriginalassets",
|
97 | "anyOf": [
|
98 | {
|
99 | "type": "boolean"
|
100 | },
|
101 | {
|
102 | "instanceof": "Function"
|
103 | },
|
104 | {
|
105 | "enum": ["keep-source-map"]
|
106 | }
|
107 | ]
|
108 | },
|
109 | "filename": {
|
110 | "description": "The target asset filename.",
|
111 | "link": "https://github.com/webpack-contrib/compression-webpack-plugin/#filename",
|
112 | "anyOf": [
|
113 | {
|
114 | "type": "string"
|
115 | },
|
116 | {
|
117 | "instanceof": "Function"
|
118 | }
|
119 | ]
|
120 | }
|
121 | }
|
122 | }
|