webpack 5.47.1 → 5.48.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/hot/only-dev-server.js +1 -1
- package/hot/poll.js +1 -1
- package/hot/signal.js +1 -1
- package/lib/NormalModule.js +6 -2
- package/lib/NormalModuleFactory.js +8 -2
- package/lib/config/defaults.js +18 -12
- package/lib/dependencies/HarmonyExportDependencyParserPlugin.js +6 -3
- package/lib/dependencies/HarmonyExportImportedSpecifierDependency.js +4 -2
- package/lib/dependencies/HarmonyImportDependency.js +5 -1
- package/lib/dependencies/HarmonyImportDependencyParserPlugin.js +40 -5
- package/lib/dependencies/HarmonyImportSideEffectDependency.js +2 -2
- package/lib/dependencies/HarmonyImportSpecifierDependency.js +10 -2
- package/lib/dependencies/ModuleDependency.js +8 -1
- package/lib/javascript/JavascriptParser.js +14 -9
- package/lib/rules/{DescriptionDataMatcherRulePlugin.js → ObjectMatcherRulePlugin.js} +14 -10
- package/package.json +3 -2
- package/schemas/WebpackOptions.check.js +1 -1
- package/schemas/WebpackOptions.json +7 -0
- package/types.d.ts +38 -8
@@ -3585,6 +3585,13 @@
|
|
3585
3585
|
"type": "object",
|
3586
3586
|
"additionalProperties": false,
|
3587
3587
|
"properties": {
|
3588
|
+
"assert": {
|
3589
|
+
"description": "Match on import assertions of the dependency.",
|
3590
|
+
"type": "object",
|
3591
|
+
"additionalProperties": {
|
3592
|
+
"$ref": "#/definitions/RuleSetConditionOrConditions"
|
3593
|
+
}
|
3594
|
+
},
|
3588
3595
|
"compiler": {
|
3589
3596
|
"description": "Match the child compiler name.",
|
3590
3597
|
"oneOf": [
|
package/types.d.ts
CHANGED
@@ -4742,21 +4742,44 @@ declare class JavascriptParser extends Parser {
|
|
4742
4742
|
boolean | void
|
4743
4743
|
>;
|
4744
4744
|
label: HookMap<SyncBailHook<[LabeledStatement], boolean | void>>;
|
4745
|
-
import: SyncBailHook<[
|
4745
|
+
import: SyncBailHook<[ImportDeclaration, ImportSource], boolean | void>;
|
4746
4746
|
importSpecifier: SyncBailHook<
|
4747
|
-
[
|
4747
|
+
[ImportDeclaration, ImportSource, string, string],
|
4748
|
+
boolean | void
|
4749
|
+
>;
|
4750
|
+
export: SyncBailHook<
|
4751
|
+
[ExportNamedDeclaration | ExportAllDeclaration],
|
4752
|
+
boolean | void
|
4753
|
+
>;
|
4754
|
+
exportImport: SyncBailHook<
|
4755
|
+
[ExportNamedDeclaration | ExportAllDeclaration, ImportSource],
|
4756
|
+
boolean | void
|
4757
|
+
>;
|
4758
|
+
exportDeclaration: SyncBailHook<
|
4759
|
+
[ExportNamedDeclaration | ExportAllDeclaration, Declaration],
|
4760
|
+
boolean | void
|
4761
|
+
>;
|
4762
|
+
exportExpression: SyncBailHook<
|
4763
|
+
[ExportDefaultDeclaration, Declaration],
|
4748
4764
|
boolean | void
|
4749
4765
|
>;
|
4750
|
-
export: SyncBailHook<[Statement], boolean | void>;
|
4751
|
-
exportImport: SyncBailHook<[Statement, ImportSource], boolean | void>;
|
4752
|
-
exportDeclaration: SyncBailHook<[Statement, Declaration], boolean | void>;
|
4753
|
-
exportExpression: SyncBailHook<[Statement, Declaration], boolean | void>;
|
4754
4766
|
exportSpecifier: SyncBailHook<
|
4755
|
-
[
|
4767
|
+
[
|
4768
|
+
ExportNamedDeclaration | ExportAllDeclaration,
|
4769
|
+
string,
|
4770
|
+
string,
|
4771
|
+
undefined | number
|
4772
|
+
],
|
4756
4773
|
boolean | void
|
4757
4774
|
>;
|
4758
4775
|
exportImportSpecifier: SyncBailHook<
|
4759
|
-
[
|
4776
|
+
[
|
4777
|
+
ExportNamedDeclaration | ExportAllDeclaration,
|
4778
|
+
ImportSource,
|
4779
|
+
string,
|
4780
|
+
string,
|
4781
|
+
undefined | number
|
4782
|
+
],
|
4760
4783
|
boolean | void
|
4761
4784
|
>;
|
4762
4785
|
preDeclarator: SyncBailHook<
|
@@ -6386,6 +6409,7 @@ declare class ModuleDependency extends Dependency {
|
|
6386
6409
|
request: string;
|
6387
6410
|
userRequest: string;
|
6388
6411
|
range: any;
|
6412
|
+
assertions?: Record<string, any>;
|
6389
6413
|
static Template: typeof DependencyTemplate;
|
6390
6414
|
static NO_EXPORTS_REFERENCED: string[][];
|
6391
6415
|
static EXPORTS_OBJECT_REFERENCED: string[][];
|
@@ -8947,6 +8971,7 @@ declare interface ResolveData {
|
|
8947
8971
|
resolveOptions?: ResolveOptionsWebpackOptions;
|
8948
8972
|
context: string;
|
8949
8973
|
request: string;
|
8974
|
+
assertions?: Record<string, any>;
|
8950
8975
|
dependencies: ModuleDependency[];
|
8951
8976
|
createData: Object;
|
8952
8977
|
fileDependencies: LazySet<string>;
|
@@ -9358,6 +9383,11 @@ declare interface RuleSetLogicalConditionsAbsolute {
|
|
9358
9383
|
* A rule description with conditions and effects for modules.
|
9359
9384
|
*/
|
9360
9385
|
declare interface RuleSetRule {
|
9386
|
+
/**
|
9387
|
+
* Match on import assertions of the dependency.
|
9388
|
+
*/
|
9389
|
+
assert?: { [index: string]: RuleSetConditionOrConditions };
|
9390
|
+
|
9361
9391
|
/**
|
9362
9392
|
* Match the child compiler name.
|
9363
9393
|
*/
|