UNPKG

image-minimizer-webpack-plugin

Version:

Webpack loader and plugin to optimize (compress) images using imagemin

112 lines (111 loc) 3.14 kB
{ "definitions": { "Minimizer": { "type": "object", "additionalProperties": false, "properties": { "implementation": { "description": "Implementation of the minimizer function.", "instanceof": "Function" }, "options": { "description": "Options for the minimizer function.", "type": "object", "additionalProperties": true }, "filter": { "description": "Allows filtering of images.", "instanceof": "Function" }, "filename": { "description": "Allows to set the filename for the minimized asset.", "anyOf": [ { "type": "string", "minLength": 1 }, { "instanceof": "Function" } ] } } }, "Generator": { "type": "object", "additionalProperties": false, "properties": { "type": { "description": "Type of generation", "enum": ["import"] }, "preset": { "description": "Name of preset, i.e. using in '?as=webp'.", "type": "string", "minLength": 1 }, "implementation": { "description": "Implementation of the generator function.", "instanceof": "Function" }, "options": { "description": "Options for the generator function.", "type": "object", "additionalProperties": true }, "filter": { "description": "Allows filtering of images.", "instanceof": "Function" }, "filename": { "description": "Allows to set the filename for the minimized asset.", "anyOf": [ { "type": "string", "minLength": 1 }, { "instanceof": "Function" } ] } }, "required": ["implementation", "preset"] } }, "title": "Image Minimizer Plugin Loader options", "type": "object", "additionalProperties": false, "properties": { "minimizer": { "description": "Allows you to setup the minimizer function and options.", "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#minimizer", "anyOf": [ { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Minimizer" } }, { "$ref": "#/definitions/Minimizer" } ] }, "generator": { "description": "Allows you to setup the generator function and options.", "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#generator", "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/Generator" } }, "severityError": { "description": "Allows to choose how errors are displayed.", "link": "https://github.com/webpack-contrib/image-minimizer-webpack-plugin#severityerror", "enum": ["off", "warning", "error"] } } }