UNPKG

3.14 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 "type": {
39 "description": "Type of generation",
40 "enum": ["import"]
41 },
42 "preset": {
43 "description": "Name of preset, i.e. using in '?as=webp'.",
44 "type": "string",
45 "minLength": 1
46 },
47 "implementation": {
48 "description": "Implementation of the generator function.",
49 "instanceof": "Function"
50 },
51 "options": {
52 "description": "Options for the generator function.",
53 "type": "object",
54 "additionalProperties": true
55 },
56 "filter": {
57 "description": "Allows filtering of images.",
58 "instanceof": "Function"
59 },
60 "filename": {
61 "description": "Allows to set the filename for the minimized asset.",
62 "anyOf": [
63 {
64 "type": "string",
65 "minLength": 1
66 },
67 {
68 "instanceof": "Function"
69 }
70 ]
71 }
72 },
73 "required": ["implementation", "preset"]
74 }
75 },
76 "title": "Image Minimizer Plugin Loader options",
77 "type": "object",
78 "additionalProperties": false,
79 "properties": {
80 "minimizer": {
81 "description": "Allows you to setup the minimizer function and options.",
82 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#minimizer",
83 "anyOf": [
84 {
85 "type": "array",
86 "minItems": 1,
87 "items": {
88 "$ref": "#/definitions/Minimizer"
89 }
90 },
91 {
92 "$ref": "#/definitions/Minimizer"
93 }
94 ]
95 },
96 "generator": {
97 "description": "Allows you to setup the generator function and options.",
98 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#generator",
99 "type": "array",
100 "minItems": 1,
101 "items": {
102 "$ref": "#/definitions/Generator"
103 }
104 },
105 "severityError": {
106 "description": "Allows to choose how errors are displayed.",
107 "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#severityerror",
108 "enum": ["off", "warning", "error"]
109 }
110 }
111}