123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131 |
- {
- "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
- }
|