{ "title": "Imports Loader options", "definitions": { "ImportItemString": { "type": "string", "minLength": 1, "description": "Allows to use a string to describe an import.", "link": "https://webpack.js.org/loaders/imports-loader/#string" }, "ImportItemObject": { "type": "object", "additionalProperties": false, "description": "Allows to use an object to describe an import.", "link": "https://webpack.js.org/loaders/imports-loader/#object", "properties": { "syntax": { "enum": [ "default", "named", "namespace", "side-effects", "single", "multiple", "pure" ] }, "moduleName": { "type": "string", "minLength": 1 }, "name": { "type": "string", "minLength": 1 }, "alias": { "type": "string", "minLength": 1 } }, "required": ["moduleName"] }, "ImportItem": { "anyOf": [ { "$ref": "#/definitions/ImportItemString" }, { "$ref": "#/definitions/ImportItemObject" } ] } }, "type": "object", "description": "Options for imports-loader", "properties": { "type": { "enum": ["module", "commonjs"], "description": "Format of generated exports.", "link": "https://github.com/webpack-contrib/imports-loader#type" }, "imports": { "anyOf": [ { "$ref": "#/definitions/ImportItemString" }, { "$ref": "#/definitions/ImportItem" }, { "type": "array", "minItems": 1, "items": { "$ref": "#/definitions/ImportItem" } } ] }, "wrapper": { "anyOf": [ { "type": "boolean" }, { "type": "string", "minLength": 1 }, { "type": "object", "additionalProperties": false, "properties": { "thisArg": { "type": "string", "minLength": 1 }, "args": { "anyOf": [ { "type": "array", "minItems": 1, "items": { "type": "string", "minLength": 1 } }, { "type": "object", "additionalProperties": true } ] } }, "required": ["thisArg"] } ], "description": "Closes the module code in a function with a given 'thisArg' and 'args'", "link": "https://webpack.js.org/loaders/imports-loader/#wrapper" }, "additionalCode": { "type": "string", "minLength": 1, "description": "Adds custom code as a preamble before the module's code.", "link": "https://webpack.js.org/loaders/imports-loader/#additionalcode" } }, "anyOf": [ { "required": ["imports"] }, { "required": ["wrapper"] }, { "required": ["additionalCode"] } ], "additionalProperties": false }