Skip to content

Commit b86cb8b

Browse files
authored
feat: output links and descriptions on errors (#110)
1 parent 3f420d2 commit b86cb8b

File tree

2 files changed

+97
-21
lines changed

2 files changed

+97
-21
lines changed

src/options.json

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@
33
"definitions": {
44
"ImportItemString": {
55
"type": "string",
6-
"minLength": 1
6+
"minLength": 1,
7+
"description": "Allows to use a string to describe an import.",
8+
"link": "https://webpack.js.org/loaders/imports-loader/#string"
79
},
810
"ImportItemObject": {
911
"type": "object",
1012
"additionalProperties": false,
13+
"description": "Allows to use an object to describe an import.",
14+
"link": "https://webpack.js.org/loaders/imports-loader/#object",
1115
"properties": {
1216
"syntax": {
1317
"enum": [
@@ -47,15 +51,17 @@
4751
}
4852
},
4953
"type": "object",
54+
"description": "Options for imports-loader",
5055
"properties": {
5156
"type": {
52-
"enum": ["module", "commonjs"]
57+
"enum": ["module", "commonjs"],
58+
"description": "Format of generated exports.",
59+
"link": "https://github.com/webpack-contrib/imports-loader#type"
5360
},
5461
"imports": {
5562
"anyOf": [
5663
{
57-
"type": "string",
58-
"minLength": 1
64+
"$ref": "#/definitions/ImportItemString"
5965
},
6066
{
6167
"$ref": "#/definitions/ImportItem"
@@ -105,11 +111,15 @@
105111
},
106112
"required": ["thisArg"]
107113
}
108-
]
114+
],
115+
"description": "Closes the module code in a function with a given 'thisArg' and 'args'",
116+
"link": "https://webpack.js.org/loaders/imports-loader/#wrapper"
109117
},
110118
"additionalCode": {
111119
"type": "string",
112-
"minLength": 1
120+
"minLength": 1,
121+
"description": "Adds custom code as a preamble before the module's code.",
122+
"link": "https://webpack.js.org/loaders/imports-loader/#additionalcode"
113123
}
114124
},
115125
"anyOf": [

0 commit comments

Comments
 (0)