webpack 5.14.0 → 5.18.0
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.
Potentially problematic release.
This version of webpack might be problematic. Click here for more details.
- package/bin/webpack.js +0 -0
- package/hot/lazy-compilation-node.js +38 -0
- package/hot/lazy-compilation-web.js +74 -0
- package/lib/AutomaticPrefetchPlugin.js +14 -7
- package/lib/CacheFacade.js +1 -0
- package/lib/ChunkGraph.js +132 -19
- package/lib/CodeGenerationResults.js +43 -8
- package/lib/Compilation.js +253 -149
- package/lib/Compiler.js +7 -2
- package/lib/ContextModule.js +2 -2
- package/lib/Dependency.js +1 -7
- package/lib/ExportsInfo.js +23 -5
- package/lib/ExternalModuleFactoryPlugin.js +46 -3
- package/lib/FileSystemInfo.js +192 -137
- package/lib/HotModuleReplacementPlugin.js +76 -29
- package/lib/IgnoreErrorModuleFactory.js +39 -0
- package/lib/Module.js +2 -3
- package/lib/NormalModuleFactory.js +27 -8
- package/lib/Template.js +32 -23
- package/lib/WebpackIsIncludedPlugin.js +85 -0
- package/lib/WebpackOptionsApply.js +27 -5
- package/lib/cache/PackFileCacheStrategy.js +5 -1
- package/lib/config/defaults.js +18 -18
- package/lib/config/normalization.js +44 -9
- package/lib/debug/ProfilingPlugin.js +20 -1
- package/lib/dependencies/AMDDefineDependency.js +1 -1
- package/lib/dependencies/AMDPlugin.js +6 -7
- package/lib/dependencies/CommonJsImportsParserPlugin.js +43 -1
- package/lib/dependencies/CommonJsPlugin.js +1 -6
- package/lib/dependencies/ContextDependencyHelpers.js +3 -2
- package/lib/dependencies/ExportsInfoDependency.js +0 -20
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +1 -2
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +0 -29
- package/lib/dependencies/HarmonyImportDependency.js +0 -41
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +2 -3
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +2 -36
- package/lib/dependencies/HarmonyModulesPlugin.js +2 -2
- package/lib/dependencies/ImportPlugin.js +1 -6
- package/lib/dependencies/JsonExportsDependency.js +0 -1
- package/lib/dependencies/ModuleDecoratorDependency.js +0 -1
- package/lib/dependencies/NullDependency.js +0 -8
- package/lib/dependencies/ProvidedDependency.js +0 -1
- package/lib/dependencies/StaticExportsDependency.js +0 -12
- package/lib/dependencies/SystemPlugin.js +0 -4
- package/lib/dependencies/URLDependency.js +45 -3
- package/lib/dependencies/URLPlugin.js +33 -7
- package/lib/dependencies/WebpackIsIncludedDependency.js +80 -0
- package/lib/hmr/LazyCompilationPlugin.js +348 -0
- package/lib/hmr/lazyCompilationBackend.js +86 -0
- package/lib/javascript/JavascriptModulesPlugin.js +4 -3
- package/lib/javascript/JavascriptParser.js +20 -5
- package/lib/library/AssignLibraryPlugin.js +13 -4
- package/lib/library/EnableLibraryPlugin.js +12 -0
- package/lib/optimize/ConcatenatedModule.js +0 -12
- package/lib/optimize/InnerGraph.js +32 -0
- package/lib/optimize/SplitChunksPlugin.js +4 -1
- package/lib/serialization/ObjectMiddleware.js +7 -5
- package/lib/sharing/ProvideSharedModule.js +1 -1
- package/lib/sharing/ShareRuntimeModule.js +2 -2
- package/lib/stats/DefaultStatsPresetPlugin.js +1 -0
- package/lib/util/MapHelpers.js +22 -0
- package/lib/util/binarySearchBounds.js +86 -0
- package/lib/util/createHash.js +13 -7
- package/lib/util/internalSerializables.js +2 -0
- package/lib/util/processAsyncTree.js +61 -0
- package/lib/util/runtime.js +12 -1
- package/package.json +3 -3
- package/schemas/WebpackOptions.json +330 -140
- package/schemas/plugins/container/ContainerPlugin.json +2 -1
- package/schemas/plugins/container/ModuleFederationPlugin.json +2 -1
- package/types.d.ts +320 -121
@@ -581,6 +581,33 @@
|
|
581
581
|
"description": "Enable module and chunk layers.",
|
582
582
|
"type": "boolean"
|
583
583
|
},
|
584
|
+
"lazyCompilation": {
|
585
|
+
"description": "Compile entrypoints and import()s only when they are accessed.",
|
586
|
+
"anyOf": [
|
587
|
+
{
|
588
|
+
"type": "boolean"
|
589
|
+
},
|
590
|
+
{
|
591
|
+
"type": "object",
|
592
|
+
"additionalProperties": false,
|
593
|
+
"properties": {
|
594
|
+
"backend": {
|
595
|
+
"description": "A custom backend.",
|
596
|
+
"instanceof": "Function",
|
597
|
+
"tsType": "(((compiler: import('../lib/Compiler'), client: string, callback: (err?: Error, api?: any) => void) => void) | ((compiler: import('../lib/Compiler'), client: string) => Promise<any>))"
|
598
|
+
},
|
599
|
+
"client": {
|
600
|
+
"description": "A custom client.",
|
601
|
+
"type": "string"
|
602
|
+
},
|
603
|
+
"entries": {
|
604
|
+
"description": "Enable/disable lazy compilation for entries.",
|
605
|
+
"type": "boolean"
|
606
|
+
}
|
607
|
+
}
|
608
|
+
}
|
609
|
+
]
|
610
|
+
},
|
584
611
|
"outputModule": {
|
585
612
|
"description": "Allow output javascript files as module source type.",
|
586
613
|
"type": "boolean"
|
@@ -611,28 +638,7 @@
|
|
611
638
|
"description": "If an dependency matches exactly a property of the object, the property value is used as dependency.",
|
612
639
|
"type": "object",
|
613
640
|
"additionalProperties": {
|
614
|
-
"
|
615
|
-
"anyOf": [
|
616
|
-
{
|
617
|
-
"type": "array",
|
618
|
-
"items": {
|
619
|
-
"description": "A part of the target of the external.",
|
620
|
-
"type": "string",
|
621
|
-
"minLength": 1
|
622
|
-
}
|
623
|
-
},
|
624
|
-
{
|
625
|
-
"description": "`true`: The dependency name is used as target of the external.",
|
626
|
-
"type": "boolean"
|
627
|
-
},
|
628
|
-
{
|
629
|
-
"description": "The target of the external.",
|
630
|
-
"type": "string"
|
631
|
-
},
|
632
|
-
{
|
633
|
-
"type": "object"
|
634
|
-
}
|
635
|
-
]
|
641
|
+
"$ref": "#/definitions/ExternalItemValue"
|
636
642
|
},
|
637
643
|
"properties": {
|
638
644
|
"byLayer": {
|
@@ -655,7 +661,56 @@
|
|
655
661
|
{
|
656
662
|
"description": "The function is called on each dependency (`function(context, request, callback(err, result))`).",
|
657
663
|
"instanceof": "Function",
|
658
|
-
"tsType": "((data:
|
664
|
+
"tsType": "(((data: ExternalItemFunctionData, callback: (err?: Error, result?: ExternalItemValue) => void) => void) | ((data: ExternalItemFunctionData) => Promise<ExternalItemValue>))"
|
665
|
+
}
|
666
|
+
]
|
667
|
+
},
|
668
|
+
"ExternalItemFunctionData": {
|
669
|
+
"description": "Data object passed as argument when a function is set for 'externals'.",
|
670
|
+
"type": "object",
|
671
|
+
"additionalProperties": false,
|
672
|
+
"properties": {
|
673
|
+
"context": {
|
674
|
+
"description": "The directory in which the request is placed.",
|
675
|
+
"type": "string"
|
676
|
+
},
|
677
|
+
"contextInfo": {
|
678
|
+
"description": "Contextual information.",
|
679
|
+
"type": "object",
|
680
|
+
"tsType": "import('../lib/ModuleFactory').ModuleFactoryCreateDataContextInfo"
|
681
|
+
},
|
682
|
+
"getResolve": {
|
683
|
+
"description": "Get a resolve function with the current resolver options.",
|
684
|
+
"instanceof": "Function",
|
685
|
+
"tsType": "((options?: ResolveOptions) => ((context: string, request: string, callback: (err?: Error, result?: string) => void) => void) | ((context: string, request: string) => Promise<string>))"
|
686
|
+
},
|
687
|
+
"request": {
|
688
|
+
"description": "The request as written by the user in the require/import expression/statement.",
|
689
|
+
"type": "string"
|
690
|
+
}
|
691
|
+
}
|
692
|
+
},
|
693
|
+
"ExternalItemValue": {
|
694
|
+
"description": "The dependency used for the external.",
|
695
|
+
"anyOf": [
|
696
|
+
{
|
697
|
+
"type": "array",
|
698
|
+
"items": {
|
699
|
+
"description": "A part of the target of the external.",
|
700
|
+
"type": "string",
|
701
|
+
"minLength": 1
|
702
|
+
}
|
703
|
+
},
|
704
|
+
{
|
705
|
+
"description": "`true`: The dependency name is used as target of the external.",
|
706
|
+
"type": "boolean"
|
707
|
+
},
|
708
|
+
{
|
709
|
+
"description": "The target of the external.",
|
710
|
+
"type": "string"
|
711
|
+
},
|
712
|
+
{
|
713
|
+
"type": "object"
|
659
714
|
}
|
660
715
|
]
|
661
716
|
},
|
@@ -884,6 +939,38 @@
|
|
884
939
|
}
|
885
940
|
]
|
886
941
|
},
|
942
|
+
"GeneratorOptionsByModuleType": {
|
943
|
+
"description": "Specify options for each generator.",
|
944
|
+
"type": "object",
|
945
|
+
"additionalProperties": {
|
946
|
+
"description": "Options for generating.",
|
947
|
+
"type": "object",
|
948
|
+
"additionalProperties": true
|
949
|
+
},
|
950
|
+
"properties": {
|
951
|
+
"asset": {
|
952
|
+
"$ref": "#/definitions/AssetGeneratorOptions"
|
953
|
+
},
|
954
|
+
"asset/inline": {
|
955
|
+
"$ref": "#/definitions/AssetInlineGeneratorOptions"
|
956
|
+
},
|
957
|
+
"asset/resource": {
|
958
|
+
"$ref": "#/definitions/AssetResourceGeneratorOptions"
|
959
|
+
},
|
960
|
+
"javascript": {
|
961
|
+
"$ref": "#/definitions/EmptyGeneratorOptions"
|
962
|
+
},
|
963
|
+
"javascript/auto": {
|
964
|
+
"$ref": "#/definitions/EmptyGeneratorOptions"
|
965
|
+
},
|
966
|
+
"javascript/dynamic": {
|
967
|
+
"$ref": "#/definitions/EmptyGeneratorOptions"
|
968
|
+
},
|
969
|
+
"javascript/esm": {
|
970
|
+
"$ref": "#/definitions/EmptyGeneratorOptions"
|
971
|
+
}
|
972
|
+
}
|
973
|
+
},
|
887
974
|
"GlobalObject": {
|
888
975
|
"description": "An expression which is used to address the global object/scope in runtime code.",
|
889
976
|
"type": "string",
|
@@ -1030,6 +1117,34 @@
|
|
1030
1117
|
"description": "Enable/disable parsing of CommonJs syntax.",
|
1031
1118
|
"type": "boolean"
|
1032
1119
|
},
|
1120
|
+
"commonjsMagicComments": {
|
1121
|
+
"description": "Enable/disable parsing of magic comments in CommonJs syntax.",
|
1122
|
+
"type": "boolean"
|
1123
|
+
},
|
1124
|
+
"exprContextCritical": {
|
1125
|
+
"description": "Enable warnings for full dynamic dependencies.",
|
1126
|
+
"type": "boolean"
|
1127
|
+
},
|
1128
|
+
"exprContextRecursive": {
|
1129
|
+
"description": "Enable recursive directory lookup for full dynamic dependencies.",
|
1130
|
+
"type": "boolean"
|
1131
|
+
},
|
1132
|
+
"exprContextRegExp": {
|
1133
|
+
"description": "Sets the default regular expression for full dynamic dependencies.",
|
1134
|
+
"anyOf": [
|
1135
|
+
{
|
1136
|
+
"instanceof": "RegExp",
|
1137
|
+
"tsType": "RegExp"
|
1138
|
+
},
|
1139
|
+
{
|
1140
|
+
"type": "boolean"
|
1141
|
+
}
|
1142
|
+
]
|
1143
|
+
},
|
1144
|
+
"exprContextRequest": {
|
1145
|
+
"description": "Set the default request for full dynamic dependencies.",
|
1146
|
+
"type": "string"
|
1147
|
+
},
|
1033
1148
|
"harmony": {
|
1034
1149
|
"description": "Enable/disable parsing of EcmaScript Modules syntax.",
|
1035
1150
|
"type": "boolean"
|
@@ -1057,10 +1172,42 @@
|
|
1057
1172
|
"description": "Enable/disable parsing of require.js special syntax like require.config, requirejs.config, require.version and requirejs.onError.",
|
1058
1173
|
"type": "boolean"
|
1059
1174
|
},
|
1175
|
+
"strictExportPresence": {
|
1176
|
+
"description": "Emit errors instead of warnings when imported names don't exist in imported module.",
|
1177
|
+
"type": "boolean"
|
1178
|
+
},
|
1179
|
+
"strictThisContextOnImports": {
|
1180
|
+
"description": "Handle the this context correctly according to the spec for namespace objects.",
|
1181
|
+
"type": "boolean"
|
1182
|
+
},
|
1060
1183
|
"system": {
|
1061
1184
|
"description": "Enable/disable parsing of System.js special syntax like System.import, System.get, System.set and System.register.",
|
1062
1185
|
"type": "boolean"
|
1063
1186
|
},
|
1187
|
+
"unknownContextCritical": {
|
1188
|
+
"description": "Enable warnings when using the require function in a not statically analyse-able way.",
|
1189
|
+
"type": "boolean"
|
1190
|
+
},
|
1191
|
+
"unknownContextRecursive": {
|
1192
|
+
"description": "Enable recursive directory lookup when using the require function in a not statically analyse-able way.",
|
1193
|
+
"type": "boolean"
|
1194
|
+
},
|
1195
|
+
"unknownContextRegExp": {
|
1196
|
+
"description": "Sets the regular expression when using the require function in a not statically analyse-able way.",
|
1197
|
+
"anyOf": [
|
1198
|
+
{
|
1199
|
+
"instanceof": "RegExp",
|
1200
|
+
"tsType": "RegExp"
|
1201
|
+
},
|
1202
|
+
{
|
1203
|
+
"type": "boolean"
|
1204
|
+
}
|
1205
|
+
]
|
1206
|
+
},
|
1207
|
+
"unknownContextRequest": {
|
1208
|
+
"description": "Sets the request when using the require function in a not statically analyse-able way.",
|
1209
|
+
"type": "string"
|
1210
|
+
},
|
1064
1211
|
"url": {
|
1065
1212
|
"description": "Enable/disable parsing of new URL() syntax.",
|
1066
1213
|
"type": "boolean"
|
@@ -1080,6 +1227,19 @@
|
|
1080
1227
|
"type": "boolean"
|
1081
1228
|
}
|
1082
1229
|
]
|
1230
|
+
},
|
1231
|
+
"wrappedContextCritical": {
|
1232
|
+
"description": "Enable warnings for partial dynamic dependencies.",
|
1233
|
+
"type": "boolean"
|
1234
|
+
},
|
1235
|
+
"wrappedContextRecursive": {
|
1236
|
+
"description": "Enable recursive directory lookup for partial dynamic dependencies.",
|
1237
|
+
"type": "boolean"
|
1238
|
+
},
|
1239
|
+
"wrappedContextRegExp": {
|
1240
|
+
"description": "Set the inner regular expression for partial dynamic dependencies.",
|
1241
|
+
"instanceof": "RegExp",
|
1242
|
+
"tsType": "RegExp"
|
1083
1243
|
}
|
1084
1244
|
}
|
1085
1245
|
},
|
@@ -1224,13 +1384,14 @@
|
|
1224
1384
|
"required": ["type"]
|
1225
1385
|
},
|
1226
1386
|
"LibraryType": {
|
1227
|
-
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
1387
|
+
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
1228
1388
|
"anyOf": [
|
1229
1389
|
{
|
1230
1390
|
"enum": [
|
1231
1391
|
"var",
|
1232
1392
|
"module",
|
1233
1393
|
"assign",
|
1394
|
+
"assign-properties",
|
1234
1395
|
"this",
|
1235
1396
|
"window",
|
1236
1397
|
"self",
|
@@ -1292,11 +1453,11 @@
|
|
1292
1453
|
"type": "boolean"
|
1293
1454
|
},
|
1294
1455
|
"exprContextRecursive": {
|
1295
|
-
"description": "Enable recursive directory lookup for full dynamic dependencies.",
|
1456
|
+
"description": "Enable recursive directory lookup for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRecursive'.",
|
1296
1457
|
"type": "boolean"
|
1297
1458
|
},
|
1298
1459
|
"exprContextRegExp": {
|
1299
|
-
"description": "Sets the default regular expression for full dynamic dependencies.",
|
1460
|
+
"description": "Sets the default regular expression for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRegExp'.",
|
1300
1461
|
"anyOf": [
|
1301
1462
|
{
|
1302
1463
|
"instanceof": "RegExp",
|
@@ -1308,117 +1469,17 @@
|
|
1308
1469
|
]
|
1309
1470
|
},
|
1310
1471
|
"exprContextRequest": {
|
1311
|
-
"description": "Set the default request for full dynamic dependencies.",
|
1472
|
+
"description": "Set the default request for full dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.exprContextRequest'.",
|
1312
1473
|
"type": "string"
|
1313
1474
|
},
|
1314
1475
|
"generator": {
|
1315
|
-
"
|
1316
|
-
"type": "object",
|
1317
|
-
"additionalProperties": {
|
1318
|
-
"description": "Options for generating.",
|
1319
|
-
"type": "object",
|
1320
|
-
"additionalProperties": true
|
1321
|
-
},
|
1322
|
-
"properties": {
|
1323
|
-
"asset": {
|
1324
|
-
"$ref": "#/definitions/AssetGeneratorOptions"
|
1325
|
-
},
|
1326
|
-
"asset/inline": {
|
1327
|
-
"$ref": "#/definitions/AssetInlineGeneratorOptions"
|
1328
|
-
},
|
1329
|
-
"asset/resource": {
|
1330
|
-
"$ref": "#/definitions/AssetResourceGeneratorOptions"
|
1331
|
-
},
|
1332
|
-
"javascript": {
|
1333
|
-
"$ref": "#/definitions/EmptyGeneratorOptions"
|
1334
|
-
},
|
1335
|
-
"javascript/auto": {
|
1336
|
-
"$ref": "#/definitions/EmptyGeneratorOptions"
|
1337
|
-
},
|
1338
|
-
"javascript/dynamic": {
|
1339
|
-
"$ref": "#/definitions/EmptyGeneratorOptions"
|
1340
|
-
},
|
1341
|
-
"javascript/esm": {
|
1342
|
-
"$ref": "#/definitions/EmptyGeneratorOptions"
|
1343
|
-
}
|
1344
|
-
}
|
1476
|
+
"$ref": "#/definitions/GeneratorOptionsByModuleType"
|
1345
1477
|
},
|
1346
1478
|
"noParse": {
|
1347
|
-
"
|
1348
|
-
"anyOf": [
|
1349
|
-
{
|
1350
|
-
"type": "array",
|
1351
|
-
"items": {
|
1352
|
-
"description": "Don't parse files matching. It's matched against the full resolved request.",
|
1353
|
-
"anyOf": [
|
1354
|
-
{
|
1355
|
-
"description": "A regular expression, when matched the module is not parsed.",
|
1356
|
-
"instanceof": "RegExp",
|
1357
|
-
"tsType": "RegExp"
|
1358
|
-
},
|
1359
|
-
{
|
1360
|
-
"description": "An absolute path, when the module starts with this path it is not parsed.",
|
1361
|
-
"type": "string",
|
1362
|
-
"absolutePath": true
|
1363
|
-
},
|
1364
|
-
{
|
1365
|
-
"instanceof": "Function",
|
1366
|
-
"tsType": "Function"
|
1367
|
-
}
|
1368
|
-
]
|
1369
|
-
},
|
1370
|
-
"minItems": 1
|
1371
|
-
},
|
1372
|
-
{
|
1373
|
-
"description": "A regular expression, when matched the module is not parsed.",
|
1374
|
-
"instanceof": "RegExp",
|
1375
|
-
"tsType": "RegExp"
|
1376
|
-
},
|
1377
|
-
{
|
1378
|
-
"description": "An absolute path, when the module starts with this path it is not parsed.",
|
1379
|
-
"type": "string",
|
1380
|
-
"absolutePath": true
|
1381
|
-
},
|
1382
|
-
{
|
1383
|
-
"instanceof": "Function",
|
1384
|
-
"tsType": "Function"
|
1385
|
-
}
|
1386
|
-
]
|
1479
|
+
"$ref": "#/definitions/NoParse"
|
1387
1480
|
},
|
1388
1481
|
"parser": {
|
1389
|
-
"
|
1390
|
-
"type": "object",
|
1391
|
-
"additionalProperties": {
|
1392
|
-
"description": "Options for parsing.",
|
1393
|
-
"type": "object",
|
1394
|
-
"additionalProperties": true
|
1395
|
-
},
|
1396
|
-
"properties": {
|
1397
|
-
"asset": {
|
1398
|
-
"$ref": "#/definitions/AssetParserOptions"
|
1399
|
-
},
|
1400
|
-
"asset/inline": {
|
1401
|
-
"$ref": "#/definitions/EmptyParserOptions"
|
1402
|
-
},
|
1403
|
-
"asset/resource": {
|
1404
|
-
"$ref": "#/definitions/EmptyParserOptions"
|
1405
|
-
},
|
1406
|
-
"asset/source": {
|
1407
|
-
"$ref": "#/definitions/EmptyParserOptions"
|
1408
|
-
},
|
1409
|
-
"javascript": {
|
1410
|
-
"$ref": "#/definitions/JavascriptParserOptions"
|
1411
|
-
},
|
1412
|
-
"javascript/auto": {
|
1413
|
-
"$ref": "#/definitions/JavascriptParserOptions"
|
1414
|
-
},
|
1415
|
-
"javascript/dynamic": {
|
1416
|
-
"$ref": "#/definitions/JavascriptParserOptions"
|
1417
|
-
},
|
1418
|
-
"javascript/esm": {
|
1419
|
-
"$ref": "#/definitions/JavascriptParserOptions"
|
1420
|
-
}
|
1421
|
-
}
|
1482
|
+
"$ref": "#/definitions/ParserOptionsByModuleType"
|
1422
1483
|
},
|
1423
1484
|
"rules": {
|
1424
1485
|
"description": "An array of rules applied for modules.",
|
@@ -1429,23 +1490,23 @@
|
|
1429
1490
|
]
|
1430
1491
|
},
|
1431
1492
|
"strictExportPresence": {
|
1432
|
-
"description": "Emit errors instead of warnings when imported names don't exist in imported module.",
|
1493
|
+
"description": "Emit errors instead of warnings when imported names don't exist in imported module. Deprecated: This option has moved to 'module.parser.javascript.strictExportPresence'.",
|
1433
1494
|
"type": "boolean"
|
1434
1495
|
},
|
1435
1496
|
"strictThisContextOnImports": {
|
1436
|
-
"description": "Handle the this context correctly according to the spec for namespace objects.",
|
1497
|
+
"description": "Handle the this context correctly according to the spec for namespace objects. Deprecated: This option has moved to 'module.parser.javascript.strictThisContextOnImports'.",
|
1437
1498
|
"type": "boolean"
|
1438
1499
|
},
|
1439
1500
|
"unknownContextCritical": {
|
1440
|
-
"description": "Enable warnings when using the require function in a not statically analyse-able way.",
|
1501
|
+
"description": "Enable warnings when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextCritical'.",
|
1441
1502
|
"type": "boolean"
|
1442
1503
|
},
|
1443
1504
|
"unknownContextRecursive": {
|
1444
|
-
"description": "Enable recursive directory lookup when using the require function in a not statically analyse-able way.",
|
1505
|
+
"description": "Enable recursive directory lookup when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRecursive'.",
|
1445
1506
|
"type": "boolean"
|
1446
1507
|
},
|
1447
1508
|
"unknownContextRegExp": {
|
1448
|
-
"description": "Sets the regular expression when using the require function in a not statically analyse-able way.",
|
1509
|
+
"description": "Sets the regular expression when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRegExp'.",
|
1449
1510
|
"anyOf": [
|
1450
1511
|
{
|
1451
1512
|
"instanceof": "RegExp",
|
@@ -1457,7 +1518,7 @@
|
|
1457
1518
|
]
|
1458
1519
|
},
|
1459
1520
|
"unknownContextRequest": {
|
1460
|
-
"description": "Sets the request when using the require function in a not statically analyse-able way.",
|
1521
|
+
"description": "Sets the request when using the require function in a not statically analyse-able way. Deprecated: This option has moved to 'module.parser.javascript.unknownContextRequest'.",
|
1461
1522
|
"type": "string"
|
1462
1523
|
},
|
1463
1524
|
"unsafeCache": {
|
@@ -1473,24 +1534,114 @@
|
|
1473
1534
|
]
|
1474
1535
|
},
|
1475
1536
|
"wrappedContextCritical": {
|
1476
|
-
"description": "Enable warnings for partial dynamic dependencies.",
|
1537
|
+
"description": "Enable warnings for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextCritical'.",
|
1477
1538
|
"type": "boolean"
|
1478
1539
|
},
|
1479
1540
|
"wrappedContextRecursive": {
|
1480
|
-
"description": "Enable recursive directory lookup for partial dynamic dependencies.",
|
1541
|
+
"description": "Enable recursive directory lookup for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRecursive'.",
|
1481
1542
|
"type": "boolean"
|
1482
1543
|
},
|
1483
1544
|
"wrappedContextRegExp": {
|
1484
|
-
"description": "Set the inner regular expression for partial dynamic dependencies.",
|
1545
|
+
"description": "Set the inner regular expression for partial dynamic dependencies. Deprecated: This option has moved to 'module.parser.javascript.wrappedContextRegExp'.",
|
1485
1546
|
"instanceof": "RegExp",
|
1486
1547
|
"tsType": "RegExp"
|
1487
1548
|
}
|
1488
1549
|
}
|
1489
1550
|
},
|
1551
|
+
"ModuleOptionsNormalized": {
|
1552
|
+
"description": "Options affecting the normal modules (`NormalModuleFactory`).",
|
1553
|
+
"type": "object",
|
1554
|
+
"additionalProperties": false,
|
1555
|
+
"properties": {
|
1556
|
+
"defaultRules": {
|
1557
|
+
"description": "An array of rules applied by default for modules.",
|
1558
|
+
"cli": {
|
1559
|
+
"exclude": true
|
1560
|
+
},
|
1561
|
+
"oneOf": [
|
1562
|
+
{
|
1563
|
+
"$ref": "#/definitions/RuleSetRules"
|
1564
|
+
}
|
1565
|
+
]
|
1566
|
+
},
|
1567
|
+
"generator": {
|
1568
|
+
"$ref": "#/definitions/GeneratorOptionsByModuleType"
|
1569
|
+
},
|
1570
|
+
"noParse": {
|
1571
|
+
"$ref": "#/definitions/NoParse"
|
1572
|
+
},
|
1573
|
+
"parser": {
|
1574
|
+
"$ref": "#/definitions/ParserOptionsByModuleType"
|
1575
|
+
},
|
1576
|
+
"rules": {
|
1577
|
+
"description": "An array of rules applied for modules.",
|
1578
|
+
"oneOf": [
|
1579
|
+
{
|
1580
|
+
"$ref": "#/definitions/RuleSetRules"
|
1581
|
+
}
|
1582
|
+
]
|
1583
|
+
},
|
1584
|
+
"unsafeCache": {
|
1585
|
+
"description": "Cache the resolving of module requests.",
|
1586
|
+
"anyOf": [
|
1587
|
+
{
|
1588
|
+
"type": "boolean"
|
1589
|
+
},
|
1590
|
+
{
|
1591
|
+
"instanceof": "Function",
|
1592
|
+
"tsType": "Function"
|
1593
|
+
}
|
1594
|
+
]
|
1595
|
+
}
|
1596
|
+
},
|
1597
|
+
"required": ["defaultRules", "generator", "parser", "rules"]
|
1598
|
+
},
|
1490
1599
|
"Name": {
|
1491
1600
|
"description": "Name of the configuration. Used when loading multiple configurations.",
|
1492
1601
|
"type": "string"
|
1493
1602
|
},
|
1603
|
+
"NoParse": {
|
1604
|
+
"description": "Don't parse files matching. It's matched against the full resolved request.",
|
1605
|
+
"anyOf": [
|
1606
|
+
{
|
1607
|
+
"type": "array",
|
1608
|
+
"items": {
|
1609
|
+
"description": "Don't parse files matching. It's matched against the full resolved request.",
|
1610
|
+
"anyOf": [
|
1611
|
+
{
|
1612
|
+
"description": "A regular expression, when matched the module is not parsed.",
|
1613
|
+
"instanceof": "RegExp",
|
1614
|
+
"tsType": "RegExp"
|
1615
|
+
},
|
1616
|
+
{
|
1617
|
+
"description": "An absolute path, when the module starts with this path it is not parsed.",
|
1618
|
+
"type": "string",
|
1619
|
+
"absolutePath": true
|
1620
|
+
},
|
1621
|
+
{
|
1622
|
+
"instanceof": "Function",
|
1623
|
+
"tsType": "Function"
|
1624
|
+
}
|
1625
|
+
]
|
1626
|
+
},
|
1627
|
+
"minItems": 1
|
1628
|
+
},
|
1629
|
+
{
|
1630
|
+
"description": "A regular expression, when matched the module is not parsed.",
|
1631
|
+
"instanceof": "RegExp",
|
1632
|
+
"tsType": "RegExp"
|
1633
|
+
},
|
1634
|
+
{
|
1635
|
+
"description": "An absolute path, when the module starts with this path it is not parsed.",
|
1636
|
+
"type": "string",
|
1637
|
+
"absolutePath": true
|
1638
|
+
},
|
1639
|
+
{
|
1640
|
+
"instanceof": "Function",
|
1641
|
+
"tsType": "Function"
|
1642
|
+
}
|
1643
|
+
]
|
1644
|
+
},
|
1494
1645
|
"Node": {
|
1495
1646
|
"description": "Include polyfills or mocks for various node stuff.",
|
1496
1647
|
"anyOf": [
|
@@ -2478,6 +2629,41 @@
|
|
2478
2629
|
"type": "number",
|
2479
2630
|
"minimum": 1
|
2480
2631
|
},
|
2632
|
+
"ParserOptionsByModuleType": {
|
2633
|
+
"description": "Specify options for each parser.",
|
2634
|
+
"type": "object",
|
2635
|
+
"additionalProperties": {
|
2636
|
+
"description": "Options for parsing.",
|
2637
|
+
"type": "object",
|
2638
|
+
"additionalProperties": true
|
2639
|
+
},
|
2640
|
+
"properties": {
|
2641
|
+
"asset": {
|
2642
|
+
"$ref": "#/definitions/AssetParserOptions"
|
2643
|
+
},
|
2644
|
+
"asset/inline": {
|
2645
|
+
"$ref": "#/definitions/EmptyParserOptions"
|
2646
|
+
},
|
2647
|
+
"asset/resource": {
|
2648
|
+
"$ref": "#/definitions/EmptyParserOptions"
|
2649
|
+
},
|
2650
|
+
"asset/source": {
|
2651
|
+
"$ref": "#/definitions/EmptyParserOptions"
|
2652
|
+
},
|
2653
|
+
"javascript": {
|
2654
|
+
"$ref": "#/definitions/JavascriptParserOptions"
|
2655
|
+
},
|
2656
|
+
"javascript/auto": {
|
2657
|
+
"$ref": "#/definitions/JavascriptParserOptions"
|
2658
|
+
},
|
2659
|
+
"javascript/dynamic": {
|
2660
|
+
"$ref": "#/definitions/JavascriptParserOptions"
|
2661
|
+
},
|
2662
|
+
"javascript/esm": {
|
2663
|
+
"$ref": "#/definitions/JavascriptParserOptions"
|
2664
|
+
}
|
2665
|
+
}
|
2666
|
+
},
|
2481
2667
|
"Path": {
|
2482
2668
|
"description": "The output directory as **absolute path** (required).",
|
2483
2669
|
"type": "string",
|
@@ -3542,6 +3728,10 @@
|
|
3542
3728
|
"description": "Add built modules information to chunk information.",
|
3543
3729
|
"type": "boolean"
|
3544
3730
|
},
|
3731
|
+
"chunkModulesSpace": {
|
3732
|
+
"description": "Space to display chunk modules (groups will be collapsed to fit this space, value is in number of modules/group).",
|
3733
|
+
"type": "number"
|
3734
|
+
},
|
3545
3735
|
"chunkOrigins": {
|
3546
3736
|
"description": "Add the origins of chunks and chunk merging info.",
|
3547
3737
|
"type": "boolean"
|
@@ -4060,7 +4250,7 @@
|
|
4060
4250
|
"$ref": "#/definitions/Mode"
|
4061
4251
|
},
|
4062
4252
|
"module": {
|
4063
|
-
"$ref": "#/definitions/
|
4253
|
+
"$ref": "#/definitions/ModuleOptionsNormalized"
|
4064
4254
|
},
|
4065
4255
|
"name": {
|
4066
4256
|
"$ref": "#/definitions/Name"
|
@@ -201,13 +201,14 @@
|
|
201
201
|
"required": ["type"]
|
202
202
|
},
|
203
203
|
"LibraryType": {
|
204
|
-
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
204
|
+
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
205
205
|
"anyOf": [
|
206
206
|
{
|
207
207
|
"enum": [
|
208
208
|
"var",
|
209
209
|
"module",
|
210
210
|
"assign",
|
211
|
+
"assign-properties",
|
211
212
|
"this",
|
212
213
|
"window",
|
213
214
|
"self",
|
@@ -225,13 +225,14 @@
|
|
225
225
|
"required": ["type"]
|
226
226
|
},
|
227
227
|
"LibraryType": {
|
228
|
-
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
228
|
+
"description": "Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).",
|
229
229
|
"anyOf": [
|
230
230
|
{
|
231
231
|
"enum": [
|
232
232
|
"var",
|
233
233
|
"module",
|
234
234
|
"assign",
|
235
|
+
"assign-properties",
|
235
236
|
"this",
|
236
237
|
"window",
|
237
238
|
"self",
|