Skip to content

Commit d9d1959

Browse files
committed
Added documentation and fix errors
1 parent 7950e3d commit d9d1959

5 files changed

Lines changed: 92 additions & 72 deletions

File tree

‎schemas/plugins/DllPlugin.json‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,23 @@
11
{
22
"id": "DllPlugin",
33
"additionalProperties": false,
4+
"required": [
5+
"path",
6+
"name"
7+
],
48
"properties": {
59
"context": {
610
"description": "Context of requests in the manifest file (defaults to the webpack context)",
711
"minLength": 1,
812
"type": "string"
913
},
1014
"name": {
11-
"description": "Name of the exposed dll function",
15+
"description": "Name of the exposed dll function (external name, use value of 'output.library')",
16+
"minLength": 1,
17+
"type": "string"
18+
},
19+
"type": {
20+
"description": "Type of the dll bundle (external type, use value of 'output.libraryTarget')",
1221
"minLength": 1,
1322
"type": "string"
1423
},

‎schemas/plugins/DllReferencePlugin.json‎

Lines changed: 24 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
{
22
"id": "DllReferencePlugin",
33
"additionalProperties": false,
4+
"required": [
5+
"manifest"
6+
],
47
"properties": {
58
"context": {
69
"description": "(absolute path) context of requests in the manifest (or content property)",
7-
"minLength": 1,
8-
"type": "string"
10+
"type": "string",
11+
"absolutePath": true
912
},
1013
"manifest": {
1114
"description": "An object containing content and name or a string to the absolute path of the JSON manifest to be loaded upon compilation",
@@ -20,15 +23,20 @@
2023
"type": "object"
2124
},
2225
"name": {
23-
"description": "The name where the dll is exposed",
26+
"description": "The name where the dll is exposed (external name)",
27+
"minLength": 1,
28+
"type": "string"
29+
},
30+
"type": {
31+
"description": "The type how the dll is exposed (external type)",
2432
"minLength": 1,
2533
"type": "string"
2634
}
2735
}
2836
},
2937
{
30-
"minLength": 1,
31-
"type": "string"
38+
"type": "string",
39+
"absolutePath": true
3240
}
3341
]
3442
},
@@ -38,17 +46,24 @@
3846
"type": "object"
3947
},
4048
"name": {
41-
"description": "The name where the dll is exposed (defaults to manifest.name)",
49+
"description": "The name where the dll is exposed (external name, defaults to manifest.name)",
4250
"minLength": 1,
4351
"type": "string"
4452
},
53+
"type": {
54+
"description": "The way how the export of the dll bundle is used",
55+
"enum": [
56+
"require",
57+
"object"
58+
]
59+
},
4560
"scope": {
4661
"description": "Prefix which is used for accessing the content of the dll",
4762
"minLength": 1,
4863
"type": "string"
4964
},
5065
"sourceType": {
51-
"description": "How the dll is exposed (libraryTarget)",
66+
"description": "How the dll is exposed (libraryTarget, defaults to manifest.type)",
5267
"enum": [
5368
"var",
5469
"assign",
@@ -65,10 +80,10 @@
6580
]
6681
},
6782
"extensions": {
68-
"description": "UNDOCUMENTED",
83+
"description": "Extensions used to resolve modules in the dll bundle (only used when using 'scope')",
6984
"type": "array",
7085
"items": {
71-
"description": "UNDOCUMENTED",
86+
"description": "An extension",
7287
"type": "string"
7388
}
7489
}

‎schemas/plugins/HashedModuleIdsPlugin.json‎

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,8 @@
55
"properties": {
66
"hashFunction": {
77
"description": "The hashing algorithm to use, defaults to 'md5'. All functions from Node.JS' crypto.createHash are supported.",
8-
"enum": [
9-
"md5",
10-
"md4",
11-
"md2",
12-
"sha1",
13-
"sha",
14-
"sha224",
15-
"sha256",
16-
"sha384",
17-
"sha512",
18-
"mdc2",
19-
"ripemd160"
20-
]
8+
"type": "string",
9+
"minLength": 1
2110
},
2211
"hashDigest": {
2312
"description": "The encoding to use when generating the hash, defaults to 'base64'. All encodings from Node.JS' hash.digest are supported.",
@@ -29,7 +18,8 @@
2918
},
3019
"hashDigestLength": {
3120
"description": "The prefix length of the hash digest to use, defaults to 4.",
32-
"type": "number"
21+
"type": "number",
22+
"minimum": 1
3323
}
3424
}
3525
}

‎schemas/plugins/LoaderOptionsPlugin.json‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
"properties": {
1919
"context": {
2020
"description": "The context that can be used to configure older loaders",
21-
"minLength": 1,
22-
"type": "string"
21+
"type": "string",
22+
"absolutePath": true
2323
}
2424
}
2525
}

‎schemas/plugins/SourceMapDevToolPlugin.json‎

Lines changed: 52 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -62,22 +62,24 @@
6262
"description": "Defines the output filename of the SourceMap (will be inlined if no value is provided)",
6363
"oneOf": [
6464
{
65-
"description": "null is not documented, but appears in the codebase",
65+
"description": "Disable separate SourceMap file and inline SourceMap as DataUrl",
6666
"enum": [
67+
false,
6768
null
6869
]
6970
},
7071
{
72+
"type": "string",
7173
"minLength": 1,
72-
"type": "string"
74+
"absolutePath": false
7375
}
7476
]
7577
},
7678
"append": {
7779
"description": "Appends the given value to the original asset. Usually the #sourceMappingURL comment. [url] is replaced with a URL to the source map file. false disables the appending",
7880
"oneOf": [
7981
{
80-
"description": "null is not documented, but appears in the codebase",
82+
"description": "Append no SourceMap comment to the bundle, but still generate SourceMaps",
8183
"enum": [
8284
false,
8385
null
@@ -90,10 +92,10 @@
9092
]
9193
},
9294
"moduleFilenameTemplate": {
93-
"description": "See https://webpack.js.org/configuration/output/#output-devtoolmodulefilenametemplate",
95+
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap",
9496
"oneOf": [
9597
{
96-
"description": "fn type undocumented (kinda) but appears in the codebase",
98+
"description": "Custom function generating the identifer",
9799
"instanceof": "Function"
98100
},
99101
{
@@ -103,10 +105,10 @@
103105
]
104106
},
105107
"fallbackModuleFilenameTemplate": {
106-
"description": "See https://webpack.js.org/configuration/output/#output-devtoolmodulefilenametemplate",
108+
"description": "Generator string or function to create identifiers of modules for the 'sources' array in the SourceMap used only if 'moduleFilenameTemplate' would result in a conflict",
107109
"oneOf": [
108110
{
109-
"description": "fn type undocumented (kinda) but appears in the codebase",
111+
"description": "Custom function generating the identifer",
110112
"instanceof": "Function"
111113
},
112114
{
@@ -116,55 +118,59 @@
116118
]
117119
},
118120
"module": {
119-
"description": "Indicates whether loaders should generate source maps (defaults to true)",
121+
"description": "Indicates whether SourceMaps from loaders should be used (defaults to true)",
120122
"type": "boolean"
121123
},
122124
"columns": {
123125
"description": "Indicates whether column mappings should be used (defaults to true)",
124126
"type": "boolean"
125127
},
126-
"type": {
127-
"description": "Simplify and speed up source mapping by using line to line source mappings for matched modules",
128-
"type": "object",
129-
"additionalProperties": false,
130-
"properties": {
131-
"test": {
132-
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
133-
"anyOf": [
134-
{
135-
"$ref": "#/definitions/rules"
136-
}
137-
]
138-
},
139-
"include": {
140-
"description": "Include source maps for module paths that match the given value",
141-
"anyOf": [
142-
{
143-
"$ref": "#/definitions/rules"
144-
}
145-
]
146-
},
147-
"exclude": {
148-
"description": "Exclude modules that match the given value from source map generation",
149-
"anyOf": [
150-
{
151-
"$ref": "#/definitions/rules"
152-
}
153-
]
154-
}
155-
}
156-
},
157128
"noSources": {
158-
"description": "UNDOCUMENTED",
129+
"description": "Omit the 'sourceContents' array from the SourceMap",
159130
"type": "boolean"
160131
},
161-
"lineToLine": {
162-
"description": "UNDOCUMENTED",
163-
"type": "boolean"
132+
"sourceRoot": {
133+
"description": "Provide a custom value for the 'sourceRoot' property in the SourceMap",
134+
"type": "string"
164135
},
165-
"cheap": {
166-
"description": "UNDOCUMENTED",
167-
"type": "boolean"
136+
"lineToLine": {
137+
"description": "(deprecated) try to map original files line to line to generated files",
138+
"anyOf": [
139+
{
140+
"type": "boolean"
141+
},
142+
{
143+
"description": "Simplify and speed up source mapping by using line to line source mappings for matched modules",
144+
"type": "object",
145+
"additionalProperties": false,
146+
"properties": {
147+
"test": {
148+
"description": "Include source maps for modules based on their extension (defaults to .js and .css)",
149+
"anyOf": [
150+
{
151+
"$ref": "#/definitions/rules"
152+
}
153+
]
154+
},
155+
"include": {
156+
"description": "Include source maps for module paths that match the given value",
157+
"anyOf": [
158+
{
159+
"$ref": "#/definitions/rules"
160+
}
161+
]
162+
},
163+
"exclude": {
164+
"description": "Exclude modules that match the given value from source map generation",
165+
"anyOf": [
166+
{
167+
"$ref": "#/definitions/rules"
168+
}
169+
]
170+
}
171+
}
172+
}
173+
]
168174
}
169175
}
170176
}

0 commit comments

Comments
 (0)