UNPKG

3.04 kBJSONView Raw
1{
2 "definitions": {
3 "Minimizer": {
4 "type": "object",
5 "additionalProperties": false,
6 "properties": {
7 "implementation": {
8 "description": "Implementation of the minimizer function.",
9 "instanceof": "Function"
10 },
11 "options": {
12 "description": "Options for the minimizer function.",
13 "type": "object",
14 "additionalProperties": true
15 },
16 "filter": {
17 "description": "Allows filtering of images.",
18 "instanceof": "Function"
19 },
20 "filename": {
21 "description": "Allows to set the filename for the minimized asset.",
22 "anyOf": [
23 {
24 "type": "string",
25 "minLength": 1
26 },
27 {
28 "instanceof": "Function"
29 }
30 ]
31 }
32 }
33 },
34 "Generator": {
35 "type": "object",
36 "additionalProperties": false,
37 "properties": {
38 "preset": {
39 "description": "Name of preset, i.e. using in '?as=webp'.",
40 "type": "string",
41 "minLength": 1
42 },
43 "implementation": {
44 "description": "Implementation of the generator function.",
45 "instanceof": "Function"
46 },
47 "options": {
48 "description": "Options for the generator function.",
49 "type": "object",
50 "additionalProperties": true
51 },
52 "filter": {
53 "description": "Allows filtering of images.",
54 "instanceof": "Function"
55 },
56 "filename": {
57 "description": "Allows to set the filename for the minimized asset.",
58 "anyOf": [
59 {
60 "type": "string",
61 "minLength": 1
62 },
63 {
64 "instanceof": "Function"
65 }
66 ]
67 }
68 },
69 "required": ["implementation", "preset"]
70 }
71 },
72 "title": "Image Minimizer Plugin Loader options",
73 "type": "object",
74 "additionalProperties": false,
75 "properties": {
76 "minimizer": {
77 "description": "Allows you to setup the minimizer function and options.",
78 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#minimizer",
79 "anyOf": [
80 {
81 "type": "array",
82 "minItems": 1,
83 "items": {
84 "$ref": "#/definitions/Minimizer"
85 }
86 },
87 {
88 "$ref": "#/definitions/Minimizer"
89 }
90 ]
91 },
92 "generator": {
93 "description": "Allows you to setup the generator function and options.",
94 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#generator",
95 "type": "array",
96 "minItems": 1,
97 "items": {
98 "$ref": "#/definitions/Generator"
99 }
100 },
101 "severityError": {
102 "description": "Allows to choose how errors are displayed.",
103 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#severityerror",
104 "enum": ["off", "warning", "error"]
105 }
106 }
107}