webpack 2.1.0-beta.21 → 2.1.0-beta.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/config-yargs.js +6 -5
- package/bin/convert-argv.js +59 -31
- package/bin/webpack.js +30 -2
- package/lib/APIPlugin.js +19 -16
- package/lib/Chunk.js +1 -1
- package/lib/CommonJsHarmonyMainTemplatePlugin.js +21 -0
- package/lib/CompatibilityPlugin.js +24 -17
- package/lib/Compilation.js +36 -15
- package/lib/Compiler.js +48 -15
- package/lib/ConstPlugin.js +40 -37
- package/lib/DefinePlugin.js +107 -103
- package/lib/DelegatedModule.js +1 -2
- package/lib/Dependency.js +5 -0
- package/lib/DllReferencePlugin.js +41 -15
- package/lib/ExtendedAPIPlugin.js +14 -11
- package/lib/FlagDependencyExportsPlugin.js +102 -0
- package/lib/FlagInitialModulesAsUsedPlugin.js +23 -23
- package/lib/FunctionModuleTemplatePlugin.js +4 -0
- package/lib/HotModuleReplacement.runtime.js +1 -1
- package/lib/HotModuleReplacementPlugin.js +71 -68
- package/lib/LibManifestPlugin.js +1 -2
- package/lib/LibraryTemplatePlugin.js +4 -0
- package/lib/MainTemplate.js +12 -13
- package/lib/Module.js +10 -1
- package/lib/MovedToPluginWarningPlugin.js +3 -1
- package/lib/MultiCompiler.js +81 -7
- package/lib/NodeStuffPlugin.js +97 -86
- package/lib/NormalModule.js +6 -0
- package/lib/NormalModuleFactory.js +87 -34
- package/lib/Parser.js +13 -4
- package/lib/ProvidePlugin.js +30 -27
- package/lib/RequireJsStuffPlugin.js +27 -21
- package/lib/RuleSet.js +369 -0
- package/lib/Stats.js +74 -90
- package/lib/UseStrictPlugin.js +12 -8
- package/lib/WebpackOptionsApply.js +3 -13
- package/lib/WebpackOptionsDefaulter.js +0 -1
- package/lib/WebpackOptionsValidationError.js +186 -0
- package/lib/dependencies/AMDPlugin.js +64 -55
- package/lib/dependencies/CommonJsPlugin.js +55 -45
- package/lib/dependencies/HarmonyExportExpressionDependency.js +6 -0
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +76 -16
- package/lib/dependencies/HarmonyExportSpecifierDependency.js +12 -4
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +6 -4
- package/lib/dependencies/HarmonyModulesHelpers.js +0 -29
- package/lib/dependencies/HarmonyModulesPlugin.js +11 -4
- package/lib/dependencies/RequireContextPlugin.js +12 -5
- package/lib/dependencies/RequireEnsurePlugin.js +17 -10
- package/lib/dependencies/RequireIncludePlugin.js +18 -10
- package/lib/dependencies/SystemPlugin.js +48 -29
- package/lib/node/NodeMainTemplate.runtime.js +2 -2
- package/lib/node/NodeMainTemplateAsync.runtime.js +2 -2
- package/lib/node/NodeSourcePlugin.js +84 -71
- package/lib/optimize/ChunkModuleIdRangePlugin.js +52 -0
- package/lib/optimize/EnsureChunkConditionsPlugin.js +7 -2
- package/lib/validateWebpackOptions.js +63 -0
- package/lib/webpack.js +9 -6
- package/lib/webworker/WebWorkerMainTemplate.runtime.js +35 -33
- package/package.json +13 -8
- package/schemas/webpackOptionsSchema.json +802 -0
- package/README.md +0 -315
- package/lib/LoadersList.js +0 -110
- package/lib/dependencies/LabeledExportsDependency.js +0 -21
- package/lib/dependencies/LabeledModuleDependency.js +0 -36
- package/lib/dependencies/LabeledModuleDependencyParserPlugin.js +0 -78
- package/lib/dependencies/LabeledModulesPlugin.js +0 -26
@@ -0,0 +1,802 @@
|
|
1
|
+
{
|
2
|
+
"additionalProperties": false,
|
3
|
+
"definitions": {
|
4
|
+
"common.arrayOfStringOrStringArrayValues": {
|
5
|
+
"items": {
|
6
|
+
"anyOf": [
|
7
|
+
{
|
8
|
+
"minLength": 1,
|
9
|
+
"type": "string"
|
10
|
+
},
|
11
|
+
{
|
12
|
+
"items": {
|
13
|
+
"minLength": 1,
|
14
|
+
"type": "string"
|
15
|
+
},
|
16
|
+
"type": "array"
|
17
|
+
}
|
18
|
+
]
|
19
|
+
},
|
20
|
+
"type": "array"
|
21
|
+
},
|
22
|
+
"common.arrayOfStringValues": {
|
23
|
+
"items": {
|
24
|
+
"minLength": 1,
|
25
|
+
"type": "string"
|
26
|
+
},
|
27
|
+
"type": "array"
|
28
|
+
},
|
29
|
+
"common.nonEmptyArrayOfUniqueStringValues": {
|
30
|
+
"items": {
|
31
|
+
"minLength": 1,
|
32
|
+
"type": "string"
|
33
|
+
},
|
34
|
+
"minItems": 1,
|
35
|
+
"type": "array",
|
36
|
+
"uniqueItems": true
|
37
|
+
},
|
38
|
+
"entry": {
|
39
|
+
"description": "The entry point(s) of the compilation.",
|
40
|
+
"anyOf": [
|
41
|
+
{
|
42
|
+
"additionalProperties": {
|
43
|
+
"$ref": "#/definitions/entry-item"
|
44
|
+
},
|
45
|
+
"description": "Multiple entry bundles are created. The key is the chunk name. The value can be a string or an array.",
|
46
|
+
"type": "object"
|
47
|
+
},
|
48
|
+
{
|
49
|
+
"$ref": "#/definitions/entry-item"
|
50
|
+
}
|
51
|
+
]
|
52
|
+
},
|
53
|
+
"entry-item": {
|
54
|
+
"description": "The entry point for one output file.",
|
55
|
+
"anyOf": [
|
56
|
+
{
|
57
|
+
"description": "The string is resolved to a module which is loaded upon startup.",
|
58
|
+
"minLength": 1,
|
59
|
+
"type": "string"
|
60
|
+
},
|
61
|
+
{
|
62
|
+
"allOf": [
|
63
|
+
{
|
64
|
+
"$ref": "#/definitions/common.nonEmptyArrayOfUniqueStringValues"
|
65
|
+
}
|
66
|
+
],
|
67
|
+
"description": "All modules are loaded upon startup. The last one is exported."
|
68
|
+
}
|
69
|
+
]
|
70
|
+
},
|
71
|
+
"externals": {
|
72
|
+
"anyOf": [
|
73
|
+
{
|
74
|
+
"description": "An exact matched dependency becomes external. The same string is used as external dependency.",
|
75
|
+
"type": "string"
|
76
|
+
},
|
77
|
+
{
|
78
|
+
"additionalProperties": {
|
79
|
+
"type": "string"
|
80
|
+
},
|
81
|
+
"description": "If an dependency matches exactly a property of the object, the property value is used as dependency.",
|
82
|
+
"type": "object"
|
83
|
+
},
|
84
|
+
{
|
85
|
+
"description": "`function(context, request, callback(err, result))` The function is called on each dependency.",
|
86
|
+
"instanceof": "Function"
|
87
|
+
},
|
88
|
+
{
|
89
|
+
"description": "Every matched dependency becomes external.",
|
90
|
+
"instanceof": "RegExp"
|
91
|
+
},
|
92
|
+
{
|
93
|
+
"items": {
|
94
|
+
"$ref": "#/definitions/externals"
|
95
|
+
},
|
96
|
+
"type": "array"
|
97
|
+
}
|
98
|
+
],
|
99
|
+
"description": "Specify dependencies that shouldn't be resolved by webpack, but should become dependencies of the resulting bundle. The kind of the dependency depends on `output.libraryTarget`."
|
100
|
+
},
|
101
|
+
"module": {
|
102
|
+
"additionalProperties": false,
|
103
|
+
"description": "Options affecting the normal modules (`NormalModuleFactory`).",
|
104
|
+
"properties": {
|
105
|
+
"exprContextCritical": {
|
106
|
+
"type": "boolean"
|
107
|
+
},
|
108
|
+
"exprContextRecursive": {
|
109
|
+
"type": "boolean"
|
110
|
+
},
|
111
|
+
"exprContextRegExp": {
|
112
|
+
"instanceof": "RegExp"
|
113
|
+
},
|
114
|
+
"exprContextRequest": {
|
115
|
+
"type": "string"
|
116
|
+
},
|
117
|
+
"loaders": {
|
118
|
+
"allOf": [
|
119
|
+
{
|
120
|
+
"$ref": "#/definitions/ruleSet-rules"
|
121
|
+
}
|
122
|
+
],
|
123
|
+
"description": "An array of automatically applied loaders."
|
124
|
+
},
|
125
|
+
"noParse": {
|
126
|
+
"description": "Don't parse files matching. It's matched against the full resolved request.",
|
127
|
+
"anyOf": [
|
128
|
+
{
|
129
|
+
"items": {
|
130
|
+
"instanceof": "RegExp"
|
131
|
+
},
|
132
|
+
"minItems": 1,
|
133
|
+
"type": "array",
|
134
|
+
"uniqueItems": true
|
135
|
+
},
|
136
|
+
{
|
137
|
+
"instanceof": "RegExp"
|
138
|
+
}
|
139
|
+
]
|
140
|
+
},
|
141
|
+
"rules": {
|
142
|
+
"allOf": [
|
143
|
+
{
|
144
|
+
"$ref": "#/definitions/ruleSet-rules"
|
145
|
+
}
|
146
|
+
],
|
147
|
+
"description": "An array of rules applied for modules."
|
148
|
+
},
|
149
|
+
"unknownContextCritical": {
|
150
|
+
"type": "boolean"
|
151
|
+
},
|
152
|
+
"unknownContextRecursive": {
|
153
|
+
"type": "boolean"
|
154
|
+
},
|
155
|
+
"unknownContextRegExp": {
|
156
|
+
"instanceof": "RegExp"
|
157
|
+
},
|
158
|
+
"unknownContextRequest": {
|
159
|
+
"type": "string"
|
160
|
+
},
|
161
|
+
"wrappedContextCritical": {
|
162
|
+
"type": "boolean"
|
163
|
+
},
|
164
|
+
"wrappedContextRecursive": {
|
165
|
+
"type": "boolean"
|
166
|
+
},
|
167
|
+
"wrappedContextRegExp": {
|
168
|
+
"instanceof": "RegExp"
|
169
|
+
}
|
170
|
+
},
|
171
|
+
"type": "object"
|
172
|
+
},
|
173
|
+
"output": {
|
174
|
+
"additionalProperties": false,
|
175
|
+
"description": "Options affecting the output of the compilation. `output` options tell webpack how to write the compiled files to disk.",
|
176
|
+
"properties": {
|
177
|
+
"auxiliaryComment": {
|
178
|
+
"description": "Add a comment in the UMD wrapper.",
|
179
|
+
"anyOf": [
|
180
|
+
{
|
181
|
+
"description": "Append the same comment above each import style.",
|
182
|
+
"type": "string"
|
183
|
+
},
|
184
|
+
{
|
185
|
+
"additionalProperties": false,
|
186
|
+
"description": "Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.",
|
187
|
+
"properties": {
|
188
|
+
"amd": {
|
189
|
+
"type": "string"
|
190
|
+
},
|
191
|
+
"commonjs": {
|
192
|
+
"type": "string"
|
193
|
+
},
|
194
|
+
"commonjs2": {
|
195
|
+
"type": "string"
|
196
|
+
},
|
197
|
+
"root": {
|
198
|
+
"type": "string"
|
199
|
+
}
|
200
|
+
},
|
201
|
+
"type": "object"
|
202
|
+
}
|
203
|
+
]
|
204
|
+
},
|
205
|
+
"chunkFilename": {
|
206
|
+
"description": "The filename of non-entry chunks as relative path inside the `output.path` directory.",
|
207
|
+
"type": "string"
|
208
|
+
},
|
209
|
+
"crossOriginLoading": {
|
210
|
+
"description": "This option enables cross-origin loading of chunks.",
|
211
|
+
"enum": [
|
212
|
+
false,
|
213
|
+
"anonymous",
|
214
|
+
"use-credentials"
|
215
|
+
]
|
216
|
+
},
|
217
|
+
"devtoolFallbackModuleFilenameTemplate": {
|
218
|
+
"description": "Similar to `output.devtoolModuleFilenameTemplate`, but used in the case of duplicate module identifiers.",
|
219
|
+
"anyOf": [
|
220
|
+
{
|
221
|
+
"type": "string"
|
222
|
+
},
|
223
|
+
{
|
224
|
+
"instanceof": "Function"
|
225
|
+
}
|
226
|
+
]
|
227
|
+
},
|
228
|
+
"devtoolLineToLine": {
|
229
|
+
"description": "Enable line to line mapped mode for all/specified modules. Line to line mapped mode uses a simple SourceMap where each line of the generated source is mapped to the same line of the original source. It’s a performance optimization. Only use it if your performance need to be better and you are sure that input lines match which generated lines.",
|
230
|
+
"anyOf": [
|
231
|
+
{
|
232
|
+
"description": "`true` enables it for all modules (not recommended)",
|
233
|
+
"type": "boolean"
|
234
|
+
},
|
235
|
+
{
|
236
|
+
"description": "An object similar to `module.loaders` enables it for specific files.",
|
237
|
+
"properties": {
|
238
|
+
"exclude": {
|
239
|
+
"type": "string"
|
240
|
+
},
|
241
|
+
"include": {
|
242
|
+
"type": "string"
|
243
|
+
},
|
244
|
+
"test": {
|
245
|
+
"type": "string"
|
246
|
+
}
|
247
|
+
},
|
248
|
+
"type": "object"
|
249
|
+
}
|
250
|
+
]
|
251
|
+
},
|
252
|
+
"devtoolModuleFilenameTemplate": {
|
253
|
+
"description": "Filename template string of function for the sources array in a generated SourceMap.",
|
254
|
+
"anyOf": [
|
255
|
+
{
|
256
|
+
"type": "string"
|
257
|
+
},
|
258
|
+
{
|
259
|
+
"instanceof": "Function"
|
260
|
+
}
|
261
|
+
]
|
262
|
+
},
|
263
|
+
"filename": {
|
264
|
+
"description": "Specifies the name of each output file on disk. You must **not** specify an absolute path here! The `output.path` option determines the location on disk the files are written to, filename is used solely for naming the individual files.",
|
265
|
+
"type": "string"
|
266
|
+
},
|
267
|
+
"hashDigest": {
|
268
|
+
"minLength": 1,
|
269
|
+
"type": "string"
|
270
|
+
},
|
271
|
+
"hashDigestLength": {
|
272
|
+
"minimum": 1,
|
273
|
+
"type": "number"
|
274
|
+
},
|
275
|
+
"hashFunction": {
|
276
|
+
"minLength": 1,
|
277
|
+
"type": "string"
|
278
|
+
},
|
279
|
+
"hotUpdateChunkFilename": {
|
280
|
+
"description": "The filename of the Hot Update Chunks. They are inside the output.path directory.",
|
281
|
+
"type": "string"
|
282
|
+
},
|
283
|
+
"hotUpdateFunction": {
|
284
|
+
"description": "The JSONP function used by webpack for async loading of hot update chunks.",
|
285
|
+
"type": "string"
|
286
|
+
},
|
287
|
+
"hotUpdateMainFilename": {
|
288
|
+
"description": "The filename of the Hot Update Main File. It is inside the `output.path` directory.",
|
289
|
+
"type": "string"
|
290
|
+
},
|
291
|
+
"jsonpFunction": {
|
292
|
+
"description": "The JSONP function used by webpack for async loading of chunks.",
|
293
|
+
"type": "string"
|
294
|
+
},
|
295
|
+
"library": {
|
296
|
+
"anyOf": [
|
297
|
+
{
|
298
|
+
"type": "string"
|
299
|
+
},
|
300
|
+
{
|
301
|
+
"items": {
|
302
|
+
"type": "string"
|
303
|
+
},
|
304
|
+
"type": "array"
|
305
|
+
}
|
306
|
+
],
|
307
|
+
"description": "If set, export the bundle as library. `output.library` is the name."
|
308
|
+
},
|
309
|
+
"libraryTarget": {
|
310
|
+
"enum": [
|
311
|
+
"var",
|
312
|
+
"assign",
|
313
|
+
"this",
|
314
|
+
"window",
|
315
|
+
"global",
|
316
|
+
"commonjs",
|
317
|
+
"commonjs2",
|
318
|
+
"commonjs-module",
|
319
|
+
"amd",
|
320
|
+
"umd",
|
321
|
+
"umd2",
|
322
|
+
"jsonp"
|
323
|
+
]
|
324
|
+
},
|
325
|
+
"path": {
|
326
|
+
"description": "The output directory as **absolute path** (required).",
|
327
|
+
"type": "string"
|
328
|
+
},
|
329
|
+
"pathinfo": {
|
330
|
+
"description": "Include comments with information about the modules.",
|
331
|
+
"type": "boolean"
|
332
|
+
},
|
333
|
+
"publicPath": {
|
334
|
+
"description": "The `publicPath` specifies the public URL address of the output files when referenced in a browser.",
|
335
|
+
"type": "string"
|
336
|
+
},
|
337
|
+
"sourceMapFilename": {
|
338
|
+
"description": "The filename of the SourceMaps for the JavaScript files. They are inside the `output.path` directory.",
|
339
|
+
"type": "string"
|
340
|
+
},
|
341
|
+
"sourcePrefix": {
|
342
|
+
"description": "Prefixes every line of the source in the bundle with this string.",
|
343
|
+
"type": "string"
|
344
|
+
},
|
345
|
+
"umdNamedDefine": {
|
346
|
+
"description": "If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.",
|
347
|
+
"type": "boolean"
|
348
|
+
}
|
349
|
+
},
|
350
|
+
"type": "object"
|
351
|
+
},
|
352
|
+
"resolve": {
|
353
|
+
"additionalProperties": false,
|
354
|
+
"properties": {
|
355
|
+
"alias": {
|
356
|
+
"anyOf": [
|
357
|
+
{
|
358
|
+
"additionalProperties": {
|
359
|
+
"type": "string"
|
360
|
+
},
|
361
|
+
"type": "object"
|
362
|
+
},
|
363
|
+
{
|
364
|
+
"items": {
|
365
|
+
"additionalProperties": false,
|
366
|
+
"properties": {
|
367
|
+
"alias": {
|
368
|
+
"type": "string"
|
369
|
+
},
|
370
|
+
"name": {
|
371
|
+
"type": "string"
|
372
|
+
},
|
373
|
+
"onlyModule": {
|
374
|
+
"type": "boolean"
|
375
|
+
}
|
376
|
+
},
|
377
|
+
"type": "object"
|
378
|
+
},
|
379
|
+
"type": "array"
|
380
|
+
}
|
381
|
+
]
|
382
|
+
},
|
383
|
+
"aliasFields": {
|
384
|
+
"$ref": "#/definitions/common.arrayOfStringOrStringArrayValues"
|
385
|
+
},
|
386
|
+
"cachePredicate": {
|
387
|
+
"instanceof": "Function"
|
388
|
+
},
|
389
|
+
"descriptionFiles": {
|
390
|
+
"$ref": "#/definitions/common.arrayOfStringValues"
|
391
|
+
},
|
392
|
+
"enforceExtension": {
|
393
|
+
"type": "boolean"
|
394
|
+
},
|
395
|
+
"enforceModuleExtension": {
|
396
|
+
"type": "boolean"
|
397
|
+
},
|
398
|
+
"extensions": {
|
399
|
+
"$ref": "#/definitions/common.arrayOfStringValues"
|
400
|
+
},
|
401
|
+
"fileSystem": {},
|
402
|
+
"mainFields": {
|
403
|
+
"$ref": "#/definitions/common.arrayOfStringOrStringArrayValues"
|
404
|
+
},
|
405
|
+
"mainFiles": {
|
406
|
+
"$ref": "#/definitions/common.arrayOfStringValues"
|
407
|
+
},
|
408
|
+
"moduleExtensions": {
|
409
|
+
"$ref": "#/definitions/common.arrayOfStringValues"
|
410
|
+
},
|
411
|
+
"modules": {
|
412
|
+
"$ref": "#/definitions/common.arrayOfStringValues"
|
413
|
+
},
|
414
|
+
"plugins": {
|
415
|
+
"type": "array"
|
416
|
+
},
|
417
|
+
"resolver": {},
|
418
|
+
"symlinks": {
|
419
|
+
"type": "boolean"
|
420
|
+
},
|
421
|
+
"unsafeCache": {
|
422
|
+
"anyOf": [
|
423
|
+
{
|
424
|
+
"type": "boolean"
|
425
|
+
},
|
426
|
+
{
|
427
|
+
"additionalProperties": true,
|
428
|
+
"type": "object"
|
429
|
+
}
|
430
|
+
]
|
431
|
+
}
|
432
|
+
},
|
433
|
+
"type": "object"
|
434
|
+
},
|
435
|
+
"ruleSet-condition": {
|
436
|
+
"anyOf": [
|
437
|
+
{
|
438
|
+
"instanceof": "RegExp"
|
439
|
+
},
|
440
|
+
{
|
441
|
+
"minLength": 1,
|
442
|
+
"type": "string"
|
443
|
+
},
|
444
|
+
{
|
445
|
+
"instanceof": "Function"
|
446
|
+
},
|
447
|
+
{
|
448
|
+
"$ref": "#/definitions/ruleSet-conditions"
|
449
|
+
},
|
450
|
+
{
|
451
|
+
"additionalProperties": false,
|
452
|
+
"properties": {
|
453
|
+
"and": {
|
454
|
+
"$ref": "#/definitions/ruleSet-conditions"
|
455
|
+
},
|
456
|
+
"exclude": {
|
457
|
+
"$ref": "#/definitions/ruleSet-condition"
|
458
|
+
},
|
459
|
+
"include": {
|
460
|
+
"$ref": "#/definitions/ruleSet-condition"
|
461
|
+
},
|
462
|
+
"not": {
|
463
|
+
"$ref": "#/definitions/ruleSet-conditions"
|
464
|
+
},
|
465
|
+
"or": {
|
466
|
+
"$ref": "#/definitions/ruleSet-conditions"
|
467
|
+
},
|
468
|
+
"test": {
|
469
|
+
"$ref": "#/definitions/ruleSet-condition"
|
470
|
+
}
|
471
|
+
},
|
472
|
+
"type": "object"
|
473
|
+
}
|
474
|
+
]
|
475
|
+
},
|
476
|
+
"ruleSet-conditions": {
|
477
|
+
"items": {
|
478
|
+
"$ref": "#/definitions/ruleSet-condition"
|
479
|
+
},
|
480
|
+
"type": "array"
|
481
|
+
},
|
482
|
+
"ruleSet-loader": {
|
483
|
+
"minLength": 1,
|
484
|
+
"type": "string"
|
485
|
+
},
|
486
|
+
"ruleSet-query": {
|
487
|
+
"anyOf": [
|
488
|
+
{
|
489
|
+
"type": "object"
|
490
|
+
},
|
491
|
+
{
|
492
|
+
"type": "string"
|
493
|
+
}
|
494
|
+
]
|
495
|
+
},
|
496
|
+
"ruleSet-rule": {
|
497
|
+
"additionalProperties": false,
|
498
|
+
"properties": {
|
499
|
+
"enforce": {
|
500
|
+
"enum": [
|
501
|
+
"pre",
|
502
|
+
"post"
|
503
|
+
]
|
504
|
+
},
|
505
|
+
"exclude": {
|
506
|
+
"$ref": "#/definitions/ruleSet-condition"
|
507
|
+
},
|
508
|
+
"include": {
|
509
|
+
"$ref": "#/definitions/ruleSet-condition"
|
510
|
+
},
|
511
|
+
"issuer": {
|
512
|
+
"$ref": "#/definitions/ruleSet-condition"
|
513
|
+
},
|
514
|
+
"loader": {
|
515
|
+
"anyOf": [
|
516
|
+
{
|
517
|
+
"$ref": "#/definitions/ruleSet-loader"
|
518
|
+
},
|
519
|
+
{
|
520
|
+
"$ref": "#/definitions/ruleSet-use"
|
521
|
+
}
|
522
|
+
]
|
523
|
+
},
|
524
|
+
"loaders": {
|
525
|
+
"$ref": "#/definitions/ruleSet-use"
|
526
|
+
},
|
527
|
+
"oneOf": {
|
528
|
+
"$ref": "#/definitions/ruleSet-rules"
|
529
|
+
},
|
530
|
+
"options": {
|
531
|
+
"$ref": "#/definitions/ruleSet-query"
|
532
|
+
},
|
533
|
+
"parser": {
|
534
|
+
"additionalProperties": true,
|
535
|
+
"type": "object"
|
536
|
+
},
|
537
|
+
"query": {
|
538
|
+
"$ref": "#/definitions/ruleSet-query"
|
539
|
+
},
|
540
|
+
"resource": {
|
541
|
+
"$ref": "#/definitions/ruleSet-condition"
|
542
|
+
},
|
543
|
+
"rules": {
|
544
|
+
"$ref": "#/definitions/ruleSet-rules"
|
545
|
+
},
|
546
|
+
"test": {
|
547
|
+
"$ref": "#/definitions/ruleSet-condition"
|
548
|
+
},
|
549
|
+
"use": {
|
550
|
+
"$ref": "#/definitions/ruleSet-use"
|
551
|
+
}
|
552
|
+
},
|
553
|
+
"type": "object"
|
554
|
+
},
|
555
|
+
"ruleSet-rules": {
|
556
|
+
"items": {
|
557
|
+
"$ref": "#/definitions/ruleSet-rule"
|
558
|
+
},
|
559
|
+
"type": "array"
|
560
|
+
},
|
561
|
+
"ruleSet-use": {
|
562
|
+
"anyOf": [
|
563
|
+
{
|
564
|
+
"$ref": "#/definitions/ruleSet-use-item"
|
565
|
+
},
|
566
|
+
{
|
567
|
+
"items": {
|
568
|
+
"$ref": "#/definitions/ruleSet-use-item"
|
569
|
+
},
|
570
|
+
"type": "array"
|
571
|
+
}
|
572
|
+
]
|
573
|
+
},
|
574
|
+
"ruleSet-use-item": {
|
575
|
+
"anyOf": [
|
576
|
+
{
|
577
|
+
"$ref": "#/definitions/ruleSet-loader"
|
578
|
+
},
|
579
|
+
{
|
580
|
+
"additionalProperties": false,
|
581
|
+
"properties": {
|
582
|
+
"loader": {
|
583
|
+
"$ref": "#/definitions/ruleSet-loader"
|
584
|
+
},
|
585
|
+
"options": {
|
586
|
+
"$ref": "#/definitions/ruleSet-query"
|
587
|
+
},
|
588
|
+
"query": {
|
589
|
+
"$ref": "#/definitions/ruleSet-query"
|
590
|
+
}
|
591
|
+
},
|
592
|
+
"type": "object"
|
593
|
+
}
|
594
|
+
]
|
595
|
+
}
|
596
|
+
},
|
597
|
+
"properties": {
|
598
|
+
"amd": {
|
599
|
+
"description": "Set the value of `require.amd` and `define.amd`."
|
600
|
+
},
|
601
|
+
"bail": {
|
602
|
+
"description": "Report the first error as a hard error instead of tolerating it.",
|
603
|
+
"type": "boolean"
|
604
|
+
},
|
605
|
+
"cache": {
|
606
|
+
"description": "Cache generated modules and chunks to improve performance for multiple incremental builds.",
|
607
|
+
"anyOf": [
|
608
|
+
{
|
609
|
+
"description": "You can pass `false` to disable it.",
|
610
|
+
"type": "boolean"
|
611
|
+
},
|
612
|
+
{
|
613
|
+
"description": "You can pass an object to enable it and let webpack use the passed object as cache. This way you can share the cache object between multiple compiler calls.",
|
614
|
+
"type": "object"
|
615
|
+
}
|
616
|
+
]
|
617
|
+
},
|
618
|
+
"context": {
|
619
|
+
"description": "The base directory (absolute path!) for resolving the `entry` option. If `output.pathinfo` is set, the included pathinfo is shortened to this directory.",
|
620
|
+
"type": "string"
|
621
|
+
},
|
622
|
+
"dependencies": {
|
623
|
+
"description": "References to other configurations to depend on.",
|
624
|
+
"items": {
|
625
|
+
"type": "string"
|
626
|
+
},
|
627
|
+
"type": "array"
|
628
|
+
},
|
629
|
+
"devServer": {
|
630
|
+
"type": "object"
|
631
|
+
},
|
632
|
+
"devtool": {
|
633
|
+
"description": "A developer tool to enhance debugging.",
|
634
|
+
"anyOf": [
|
635
|
+
{
|
636
|
+
"type": "string"
|
637
|
+
},
|
638
|
+
{
|
639
|
+
"enum": [
|
640
|
+
false
|
641
|
+
]
|
642
|
+
}
|
643
|
+
]
|
644
|
+
},
|
645
|
+
"entry": {
|
646
|
+
"$ref": "#/definitions/entry"
|
647
|
+
},
|
648
|
+
"externals": {
|
649
|
+
"$ref": "#/definitions/externals"
|
650
|
+
},
|
651
|
+
"loader": {
|
652
|
+
"description": "Custom values available in the loader context.",
|
653
|
+
"type": "object"
|
654
|
+
},
|
655
|
+
"module": {
|
656
|
+
"$ref": "#/definitions/module"
|
657
|
+
},
|
658
|
+
"name": {
|
659
|
+
"description": "Name of the configuration. Used when loading multiple configurations.",
|
660
|
+
"type": "string"
|
661
|
+
},
|
662
|
+
"node": {
|
663
|
+
"description": "Include polyfills or mocks for various node stuff.",
|
664
|
+
"additionalProperties": {
|
665
|
+
"enum": [
|
666
|
+
false,
|
667
|
+
true,
|
668
|
+
"mock",
|
669
|
+
"empty"
|
670
|
+
]
|
671
|
+
},
|
672
|
+
"properties": {
|
673
|
+
"Buffer": {
|
674
|
+
"type": "boolean"
|
675
|
+
},
|
676
|
+
"__dirname": {
|
677
|
+
"enum": [
|
678
|
+
false,
|
679
|
+
true,
|
680
|
+
"mock"
|
681
|
+
]
|
682
|
+
},
|
683
|
+
"__filename": {
|
684
|
+
"enum": [
|
685
|
+
false,
|
686
|
+
true,
|
687
|
+
"mock"
|
688
|
+
]
|
689
|
+
},
|
690
|
+
"console": {
|
691
|
+
"type": "boolean"
|
692
|
+
},
|
693
|
+
"global": {
|
694
|
+
"type": "boolean"
|
695
|
+
},
|
696
|
+
"process": {
|
697
|
+
"enum": [
|
698
|
+
false,
|
699
|
+
true,
|
700
|
+
"mock"
|
701
|
+
]
|
702
|
+
}
|
703
|
+
},
|
704
|
+
"type": "object"
|
705
|
+
},
|
706
|
+
"output": {
|
707
|
+
"$ref": "#/definitions/output"
|
708
|
+
},
|
709
|
+
"plugins": {
|
710
|
+
"description": "Add additional plugins to the compiler.",
|
711
|
+
"type": "array"
|
712
|
+
},
|
713
|
+
"profile": {
|
714
|
+
"description": "Capture timing information for each module.",
|
715
|
+
"type": "boolean"
|
716
|
+
},
|
717
|
+
"recordsInputPath": {
|
718
|
+
"description": "Store compiler state to a json file.",
|
719
|
+
"type": "string"
|
720
|
+
},
|
721
|
+
"recordsOutputPath": {
|
722
|
+
"description": "Load compiler state from a json file.",
|
723
|
+
"type": "string"
|
724
|
+
},
|
725
|
+
"recordsPath": {
|
726
|
+
"description": "Store/Load compiler state from/to a json file. This will result in persistent ids of modules and chunks. An absolute path is expected. `recordsPath` is used for `recordsInputPath` and `recordsOutputPath` if they left undefined.",
|
727
|
+
"type": "string"
|
728
|
+
},
|
729
|
+
"resolve": {
|
730
|
+
"$ref": "#/definitions/resolve"
|
731
|
+
},
|
732
|
+
"resolveLoader": {
|
733
|
+
"$ref": "#/definitions/resolve"
|
734
|
+
},
|
735
|
+
"stats": {
|
736
|
+
"description": "Used by the webpack CLI program to pass stats options.",
|
737
|
+
"anyOf": [
|
738
|
+
{
|
739
|
+
"type": "object"
|
740
|
+
},
|
741
|
+
{
|
742
|
+
"type": "boolean"
|
743
|
+
},
|
744
|
+
{
|
745
|
+
"enum": [
|
746
|
+
"none",
|
747
|
+
"errors-only",
|
748
|
+
"minimal",
|
749
|
+
"normal",
|
750
|
+
"verbose"
|
751
|
+
]
|
752
|
+
}
|
753
|
+
]
|
754
|
+
},
|
755
|
+
"target": {
|
756
|
+
"anyOf": [
|
757
|
+
{
|
758
|
+
"enum": [
|
759
|
+
"web",
|
760
|
+
"webworker",
|
761
|
+
"node",
|
762
|
+
"async-node",
|
763
|
+
"node-webkit",
|
764
|
+
"electron"
|
765
|
+
]
|
766
|
+
},
|
767
|
+
{
|
768
|
+
"instanceof": "Function"
|
769
|
+
}
|
770
|
+
]
|
771
|
+
},
|
772
|
+
"watch": {
|
773
|
+
"description": "Enter watch mode, which rebuilds on file change.",
|
774
|
+
"type": "boolean"
|
775
|
+
},
|
776
|
+
"watchOptions": {
|
777
|
+
"properties": {
|
778
|
+
"aggregateTimeout": {
|
779
|
+
"description": "Delay the rebuilt after the first change. Value is a time in ms.",
|
780
|
+
"type": "number"
|
781
|
+
},
|
782
|
+
"poll": {
|
783
|
+
"anyOf": [
|
784
|
+
{
|
785
|
+
"description": "`true`: use polling.",
|
786
|
+
"type": "boolean"
|
787
|
+
},
|
788
|
+
{
|
789
|
+
"description": "`number`: use polling with specified interval.",
|
790
|
+
"type": "number"
|
791
|
+
}
|
792
|
+
]
|
793
|
+
}
|
794
|
+
},
|
795
|
+
"type": "object"
|
796
|
+
}
|
797
|
+
},
|
798
|
+
"required": [
|
799
|
+
"entry"
|
800
|
+
],
|
801
|
+
"type": "object"
|
802
|
+
}
|