webpack 5.110.2 → 5.110.3
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/README.md +0 -2
- package/lib/ChunkGraph.js +20 -18
- package/lib/Compilation.js +1 -1
- package/lib/ConcatenationScope.js +25 -35
- package/lib/DotenvPlugin.js +41 -13
- package/lib/FlagDependencyUsagePlugin.js +8 -2
- package/lib/NormalModule.js +13 -20
- package/lib/RuntimePlugin.js +3 -0
- package/lib/RuntimeTemplate.js +14 -2
- package/lib/async-modules/AsyncModuleHelpers.js +10 -4
- package/lib/config/defaults.js +26 -16
- package/lib/config/normalization.js +18 -8
- package/lib/dependencies/CommonJsRequireDependency.js +18 -4
- package/lib/dependencies/ContextDependencyTemplateAsRequireCall.js +20 -7
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +100 -19
- package/lib/dependencies/HarmonyImportDependency.js +94 -41
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +12 -2
- package/lib/dependencies/HtmlEntryDependency.js +12 -2
- package/lib/dependencies/ImportContextDependency.js +43 -3
- package/lib/dependencies/ImportDependency.js +8 -29
- package/lib/dependencies/ImportParserPlugin.js +24 -14
- package/lib/dependencies/RequireHeaderDependency.js +20 -21
- package/lib/dependencies/importOptionsCheck.js +47 -0
- package/lib/errors/DotenvFileError.js +29 -0
- package/lib/errors/ImportedBindingAssignmentError.js +30 -0
- package/lib/html/HtmlModulesPlugin.js +29 -22
- package/lib/html/syntax.js +304 -143
- package/lib/javascript/JavascriptModulesPlugin.js +2 -0
- package/lib/optimize/ConcatenatedModule.js +38 -7
- package/lib/prefetch/ResourceHintPlugin.js +6 -1
- package/lib/runtime/AsyncModuleRuntimeModule.js +5 -1
- package/lib/runtime/MakeDeferredNamespaceObjectRuntime.js +11 -1
- package/lib/schemes/HttpUriPlugin.js +22 -5
- package/lib/serialization/FileMiddleware.js +15 -2
- package/lib/util/ArrayQueue.js +3 -3
- package/lib/util/URLAbsoluteSpecifier.js +3 -1
- package/lib/util/conventions.js +5 -1
- package/lib/util/internalSerializables.js +2 -0
- package/package.json +1 -1
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +9 -10
- package/types.d.ts +26 -17
|
@@ -3603,7 +3603,7 @@
|
|
|
3603
3603
|
"type": "boolean"
|
|
3604
3604
|
},
|
|
3605
3605
|
"minimize": {
|
|
3606
|
-
"description": "Enable minimizing the output. Uses optimization.minimizer. An object
|
|
3606
|
+
"description": "Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.",
|
|
3607
3607
|
"anyOf": [
|
|
3608
3608
|
{
|
|
3609
3609
|
"type": "boolean"
|
|
@@ -3613,6 +3613,9 @@
|
|
|
3613
3613
|
}
|
|
3614
3614
|
]
|
|
3615
3615
|
},
|
|
3616
|
+
"minimizeOptions": {
|
|
3617
|
+
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
3618
|
+
},
|
|
3616
3619
|
"minimizer": {
|
|
3617
3620
|
"description": "Minimizer(s) to use for minimizing the output.",
|
|
3618
3621
|
"type": "array",
|
|
@@ -4074,15 +4077,11 @@
|
|
|
4074
4077
|
"type": "boolean"
|
|
4075
4078
|
},
|
|
4076
4079
|
"minimize": {
|
|
4077
|
-
"description": "Enable minimizing the output. Uses optimization.minimizer.
|
|
4078
|
-
"
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4082
|
-
{
|
|
4083
|
-
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
4084
|
-
}
|
|
4085
|
-
]
|
|
4080
|
+
"description": "Enable minimizing the output. Uses optimization.minimizer.",
|
|
4081
|
+
"type": "boolean"
|
|
4082
|
+
},
|
|
4083
|
+
"minimizeOptions": {
|
|
4084
|
+
"$ref": "#/definitions/OptimizationMinimizeOptions"
|
|
4086
4085
|
},
|
|
4087
4086
|
"minimizer": {
|
|
4088
4087
|
"description": "Minimizer(s) to use for minimizing the output.",
|
package/types.d.ts
CHANGED
|
@@ -4534,18 +4534,6 @@ declare class ConcatenationScope {
|
|
|
4534
4534
|
*/
|
|
4535
4535
|
isWrapped(): boolean;
|
|
4536
4536
|
|
|
4537
|
-
/**
|
|
4538
|
-
* Records a `require(...)` call that was replaced as a whole by a
|
|
4539
|
-
* concatenation reference, so nothing else rewrites a range inside it.
|
|
4540
|
-
*/
|
|
4541
|
-
registerReplacedRequire(range: [number, number]): void;
|
|
4542
|
-
|
|
4543
|
-
/**
|
|
4544
|
-
* Checks whether an offset sits inside an already-replaced `require(...)` call.
|
|
4545
|
-
* Containment, not exact match: `new require(...)` is replaced from `new`.
|
|
4546
|
-
*/
|
|
4547
|
-
isInsideReplacedRequire(start: number): boolean;
|
|
4548
|
-
|
|
4549
4537
|
/**
|
|
4550
4538
|
* Records the symbol that should be used when the current module exports a
|
|
4551
4539
|
* named binding.
|
|
@@ -4590,7 +4578,15 @@ declare class ConcatenationScope {
|
|
|
4590
4578
|
static isModuleReference(name: string): boolean;
|
|
4591
4579
|
|
|
4592
4580
|
/**
|
|
4593
|
-
*
|
|
4581
|
+
* Checks whether an identifier buries a reference token without being one,
|
|
4582
|
+
* which nothing can resolve: it would reach the output as an undeclared global.
|
|
4583
|
+
*/
|
|
4584
|
+
static isLeakedModuleReference(name: string): boolean;
|
|
4585
|
+
|
|
4586
|
+
/**
|
|
4587
|
+
* Finds all encoded module references in a generated source. A match that
|
|
4588
|
+
* continues an identifier is reported as `leaked`: it is a token a wider
|
|
4589
|
+
* replacement swallowed, so substituting it would rewrite the middle of a name.
|
|
4594
4590
|
*/
|
|
4595
4591
|
static findModuleReferences(source: Source): ModuleReferenceMatch[];
|
|
4596
4592
|
|
|
@@ -18218,6 +18214,7 @@ declare interface ModuleReferenceMatch {
|
|
|
18218
18214
|
start: number;
|
|
18219
18215
|
end: number;
|
|
18220
18216
|
name: string;
|
|
18217
|
+
leaked: boolean;
|
|
18221
18218
|
}
|
|
18222
18219
|
declare interface ModuleReferenceOptions {
|
|
18223
18220
|
/**
|
|
@@ -20047,10 +20044,15 @@ declare interface Optimization {
|
|
|
20047
20044
|
mergeDuplicateChunks?: boolean;
|
|
20048
20045
|
|
|
20049
20046
|
/**
|
|
20050
|
-
* Enable minimizing the output. Uses optimization.minimizer. An object
|
|
20047
|
+
* Enable minimizing the output. Uses optimization.minimizer. An options object implies 'true' and sets optimization.minimizeOptions.
|
|
20051
20048
|
*/
|
|
20052
20049
|
minimize?: boolean | OptimizationMinimizeOptions;
|
|
20053
20050
|
|
|
20051
|
+
/**
|
|
20052
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20053
|
+
*/
|
|
20054
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20055
|
+
|
|
20054
20056
|
/**
|
|
20055
20057
|
* Minimizer(s) to use for minimizing the output.
|
|
20056
20058
|
*/
|
|
@@ -20436,9 +20438,15 @@ declare interface OptimizationNormalized {
|
|
|
20436
20438
|
mergeDuplicateChunks?: boolean;
|
|
20437
20439
|
|
|
20438
20440
|
/**
|
|
20439
|
-
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20441
|
+
* Enable minimizing the output. Uses optimization.minimizer.
|
|
20442
|
+
*/
|
|
20443
|
+
minimize?: boolean;
|
|
20444
|
+
|
|
20445
|
+
/**
|
|
20446
|
+
* Enable minimizing the output, configured per asset type. An absent type is minimized with the defaults; `false` disables minimizing it.
|
|
20447
|
+
* @since 5.110.0
|
|
20440
20448
|
*/
|
|
20441
|
-
|
|
20449
|
+
minimizeOptions?: OptimizationMinimizeOptions;
|
|
20442
20450
|
|
|
20443
20451
|
/**
|
|
20444
20452
|
* Minimizer(s) to use for minimizing the output.
|
|
@@ -20566,7 +20574,8 @@ type OptimizationNormalizedWithDefaults = OptimizationNormalized & {
|
|
|
20566
20574
|
mangleWasmImports: NonNullable<undefined | boolean>;
|
|
20567
20575
|
portableRecords: NonNullable<undefined | boolean>;
|
|
20568
20576
|
realContentHash: NonNullable<undefined | boolean>;
|
|
20569
|
-
minimize: NonNullable<undefined |
|
|
20577
|
+
minimize: NonNullable<undefined | boolean>;
|
|
20578
|
+
minimizeOptions: OptimizationMinimizeOptions;
|
|
20570
20579
|
minimizer: (
|
|
20571
20580
|
| ((this: Compiler, compiler: Compiler) => void)
|
|
20572
20581
|
| WebpackPluginInstance
|