@rspack/core 1.1.0 → 1.1.1

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.
@@ -0,0 +1,13 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export type DllEntryPluginOptions = {
3
+ name: string;
4
+ };
5
+ export declare const DllEntryPlugin: {
6
+ new (context: string, entries: string[], options: DllEntryPluginOptions): {
7
+ name: BuiltinPluginName;
8
+ _args: [context: string, entries: string[], options: DllEntryPluginOptions];
9
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
10
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
11
+ apply(compiler: import("..").Compiler): void;
12
+ };
13
+ };
@@ -0,0 +1,11 @@
1
+ import { BuiltinPluginName, type RawDllReferenceAgencyPluginOptions } from "@rspack/binding";
2
+ export type DllReferenceAgencyPluginOptions = RawDllReferenceAgencyPluginOptions;
3
+ export declare const DllReferenceAgencyPlugin: {
4
+ new (options: RawDllReferenceAgencyPluginOptions): {
5
+ name: BuiltinPluginName;
6
+ _args: [options: RawDllReferenceAgencyPluginOptions];
7
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
8
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
9
+ apply(compiler: import("..").Compiler): void;
10
+ };
11
+ };
@@ -0,0 +1,10 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export declare const FlagAllModulesAsUsedPlugin: {
3
+ new (explanation: string): {
4
+ name: BuiltinPluginName;
5
+ _args: [explanation: string];
6
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
7
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
8
+ apply(compiler: import("..").Compiler): void;
9
+ };
10
+ };
@@ -0,0 +1,18 @@
1
+ import { BuiltinPluginName } from "@rspack/binding";
2
+ export type LibManifestPluginOptions = {
3
+ context?: string;
4
+ entryOnly?: boolean;
5
+ format?: boolean;
6
+ name?: string;
7
+ path: string;
8
+ type?: string;
9
+ };
10
+ export declare const LibManifestPlugin: {
11
+ new (options: LibManifestPluginOptions): {
12
+ name: BuiltinPluginName;
13
+ _args: [options: LibManifestPluginOptions];
14
+ affectedHooks: "done" | "make" | "compile" | "emit" | "afterEmit" | "invalid" | "thisCompilation" | "afterDone" | "compilation" | "normalModuleFactory" | "contextModuleFactory" | "initialize" | "shouldEmit" | "infrastructureLog" | "beforeRun" | "run" | "assetEmitted" | "failed" | "shutdown" | "watchRun" | "watchClose" | "environment" | "afterEnvironment" | "afterPlugins" | "afterResolvers" | "beforeCompile" | "afterCompile" | "finishMake" | "entryOption" | undefined;
15
+ raw(compiler: import("..").Compiler): import("@rspack/binding").BuiltinPlugin;
16
+ apply(compiler: import("..").Compiler): void;
17
+ };
18
+ };
@@ -66,3 +66,6 @@ export * from "./WorkerPlugin";
66
66
  export * from "./FetchCompileAsyncWasmPlugin";
67
67
  export * from "./NoEmitOnErrorsPlugin";
68
68
  export * from "./ContextReplacementPlugin";
69
+ export * from "./LibManifestPlugin";
70
+ export * from "./DllEntryPlugin";
71
+ export * from "./DllReferenceAgencyPlugin";
@@ -889,17 +889,26 @@ export type Target = false | AllowTarget | AllowTarget[];
889
889
  */
890
890
  export type ExternalsType = "var" | "module" | "assign" | "this" | "window" | "self" | "global" | "commonjs" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd" | "amd-require" | "umd" | "umd2" | "jsonp" | "system" | "promise" | "import" | "module-import" | "script" | "node-commonjs";
891
891
  /**
892
- * The dependency used for the external.
892
+ * External item object when both libraryTarget and externalsType is 'umd'
893
893
  */
894
- export type ExternalItemValue = string | boolean | string[] | {
895
- /**
896
- * only available when libraryTarget and externalsType is 'umd'
897
- */
894
+ export type ExternalItemUmdValue = {
898
895
  root: string | string[];
899
896
  commonjs: string | string[];
900
897
  commonjs2: string | string[];
901
- amd?: string | string[];
898
+ amd: string | string[];
902
899
  };
900
+ /**
901
+ * External item object when not umd
902
+ */
903
+ export type ExternalItemObjectValue = Record<string, string | string[]>;
904
+ /**
905
+ * The dependency used for the external.
906
+ */
907
+ export type ExternalItemValue = string | boolean | string[] | ExternalItemUmdValue
908
+ /**
909
+ * when libraryTarget and externalsType is not 'umd'
910
+ */
911
+ | ExternalItemObjectValue;
903
912
  /**
904
913
  * If an dependency matches exactly a property of the object, the property value is used as dependency.
905
914
  */
@@ -0,0 +1,16 @@
1
+ import { type IssueData, type ParseReturnType, ZodType, type ZodTypeDef, z } from "../../compiled/zod";
2
+ import type { RspackOptions } from "./types";
3
+ export type ZodCrossFieldsOptions = ZodTypeDef & {
4
+ patterns: Array<{
5
+ test: (root: RspackOptions) => boolean;
6
+ type: ZodType;
7
+ issue?: (res: ParseReturnType<any>) => Array<IssueData>;
8
+ }>;
9
+ default: ZodType;
10
+ };
11
+ export declare class ZodRspackCrossChecker<T> extends ZodType<T> {
12
+ private params;
13
+ constructor(params: ZodCrossFieldsOptions);
14
+ _parse(input: z.ParseInput): z.ParseReturnType<T>;
15
+ _getRootData(ctx: z.ParseContext): any;
16
+ }
@@ -4,6 +4,7 @@ import { Chunk } from "../Chunk";
4
4
  import type { Compilation, PathData } from "../Compilation";
5
5
  import { Module } from "../Module";
6
6
  import type * as t from "./types";
7
+ import { ZodRspackCrossChecker } from "./utils";
7
8
  export declare const externalsType: z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>;
8
9
  export declare const rspackOptions: z.ZodObject<{
9
10
  name: z.ZodOptional<z.ZodString>;
@@ -1057,22 +1058,7 @@ export declare const rspackOptions: z.ZodObject<{
1057
1058
  } | undefined;
1058
1059
  } | undefined;
1059
1060
  }>>;
1060
- externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1061
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1062
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1063
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1064
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1065
- }, "strict", z.ZodTypeAny, {
1066
- root: string | string[];
1067
- commonjs: string | string[];
1068
- commonjs2: string | string[];
1069
- amd?: string | string[] | undefined;
1070
- }, {
1071
- root: string | string[];
1072
- commonjs: string | string[];
1073
- commonjs2: string | string[];
1074
- amd?: string | string[] | undefined;
1075
- }>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1061
+ externals: z.ZodOptional<z.ZodUnion<[z.ZodArray<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1076
1062
  context: z.ZodOptional<z.ZodString>;
1077
1063
  dependencyType: z.ZodOptional<z.ZodString>;
1078
1064
  request: z.ZodOptional<z.ZodString>;
@@ -1097,22 +1083,7 @@ export declare const rspackOptions: z.ZodObject<{
1097
1083
  contextInfo?: {
1098
1084
  issuer: string;
1099
1085
  } | undefined;
1100
- }>, z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>, z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1101
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1102
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1103
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1104
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1105
- }, "strict", z.ZodTypeAny, {
1106
- root: string | string[];
1107
- commonjs: string | string[];
1108
- commonjs2: string | string[];
1109
- amd?: string | string[] | undefined;
1110
- }, {
1111
- root: string | string[];
1112
- commonjs: string | string[];
1113
- commonjs2: string | string[];
1114
- amd?: string | string[] | undefined;
1115
- }>]>>, z.ZodOptional<z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>>], z.ZodUnknown>, z.ZodVoid>], z.ZodUnknown>, z.ZodUnknown>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1086
+ }>, z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>, z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>, z.ZodOptional<z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>>], z.ZodUnknown>, z.ZodVoid>], z.ZodUnknown>, z.ZodUnknown>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1116
1087
  context: z.ZodOptional<z.ZodString>;
1117
1088
  dependencyType: z.ZodOptional<z.ZodString>;
1118
1089
  request: z.ZodOptional<z.ZodString>;
@@ -1137,37 +1108,7 @@ export declare const rspackOptions: z.ZodObject<{
1137
1108
  contextInfo?: {
1138
1109
  issuer: string;
1139
1110
  } | undefined;
1140
- }>], z.ZodUnknown>, z.ZodPromise<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1141
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1142
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1143
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1144
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1145
- }, "strict", z.ZodTypeAny, {
1146
- root: string | string[];
1147
- commonjs: string | string[];
1148
- commonjs2: string | string[];
1149
- amd?: string | string[] | undefined;
1150
- }, {
1151
- root: string | string[];
1152
- commonjs: string | string[];
1153
- commonjs2: string | string[];
1154
- amd?: string | string[] | undefined;
1155
- }>]>>>]>, "many">, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1156
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1157
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1158
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1159
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1160
- }, "strict", z.ZodTypeAny, {
1161
- root: string | string[];
1162
- commonjs: string | string[];
1163
- commonjs2: string | string[];
1164
- amd?: string | string[] | undefined;
1165
- }, {
1166
- root: string | string[];
1167
- commonjs: string | string[];
1168
- commonjs2: string | string[];
1169
- amd?: string | string[] | undefined;
1170
- }>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1111
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>>]>, "many">, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodType<RegExp, z.ZodTypeDef, RegExp>]>, z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1171
1112
  context: z.ZodOptional<z.ZodString>;
1172
1113
  dependencyType: z.ZodOptional<z.ZodString>;
1173
1114
  request: z.ZodOptional<z.ZodString>;
@@ -1192,22 +1133,7 @@ export declare const rspackOptions: z.ZodObject<{
1192
1133
  contextInfo?: {
1193
1134
  issuer: string;
1194
1135
  } | undefined;
1195
- }>, z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>, z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1196
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1197
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1198
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1199
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1200
- }, "strict", z.ZodTypeAny, {
1201
- root: string | string[];
1202
- commonjs: string | string[];
1203
- commonjs2: string | string[];
1204
- amd?: string | string[] | undefined;
1205
- }, {
1206
- root: string | string[];
1207
- commonjs: string | string[];
1208
- commonjs2: string | string[];
1209
- amd?: string | string[] | undefined;
1210
- }>]>>, z.ZodOptional<z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>>], z.ZodUnknown>, z.ZodVoid>], z.ZodUnknown>, z.ZodUnknown>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1136
+ }>, z.ZodFunction<z.ZodTuple<[z.ZodOptional<z.ZodType<Error, z.ZodTypeDef, Error>>, z.ZodOptional<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>, z.ZodOptional<z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>>], z.ZodUnknown>, z.ZodVoid>], z.ZodUnknown>, z.ZodUnknown>]>, z.ZodFunction<z.ZodTuple<[z.ZodObject<{
1211
1137
  context: z.ZodOptional<z.ZodString>;
1212
1138
  dependencyType: z.ZodOptional<z.ZodString>;
1213
1139
  request: z.ZodOptional<z.ZodString>;
@@ -1232,22 +1158,7 @@ export declare const rspackOptions: z.ZodObject<{
1232
1158
  contextInfo?: {
1233
1159
  issuer: string;
1234
1160
  } | undefined;
1235
- }>], z.ZodUnknown>, z.ZodPromise<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, z.ZodObject<{
1236
- root: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1237
- commonjs: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1238
- commonjs2: z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>;
1239
- amd: z.ZodOptional<z.ZodUnion<[z.ZodString, z.ZodArray<z.ZodString, "many">]>>;
1240
- }, "strict", z.ZodTypeAny, {
1241
- root: string | string[];
1242
- commonjs: string | string[];
1243
- commonjs2: string | string[];
1244
- amd?: string | string[] | undefined;
1245
- }, {
1246
- root: string | string[];
1247
- commonjs: string | string[];
1248
- commonjs2: string | string[];
1249
- amd?: string | string[] | undefined;
1250
- }>]>>>]>]>>;
1161
+ }>], z.ZodUnknown>, z.ZodPromise<z.ZodUnion<[z.ZodUnion<[z.ZodUnion<[z.ZodString, z.ZodBoolean]>, z.ZodArray<z.ZodString, "many">]>, ZodRspackCrossChecker<t.ExternalItemUmdValue | t.ExternalItemObjectValue>]>>>]>]>>;
1251
1162
  externalsType: z.ZodOptional<z.ZodEnum<["var", "module", "assign", "this", "window", "self", "global", "commonjs", "commonjs2", "commonjs-module", "commonjs-static", "amd", "amd-require", "umd", "umd2", "jsonp", "system", "promise", "import", "module-import", "script", "node-commonjs"]>>;
1252
1163
  externalsPresets: z.ZodOptional<z.ZodObject<{
1253
1164
  node: z.ZodOptional<z.ZodBoolean>;
@@ -3498,65 +3409,35 @@ export declare const rspackOptions: z.ZodObject<{
3498
3409
  } | undefined;
3499
3410
  loader?: Record<string, any> | undefined;
3500
3411
  resolveLoader?: t.ResolveOptions | undefined;
3501
- externals?: string | RegExp | Record<string, string | boolean | string[] | {
3502
- root: string | string[];
3503
- commonjs: string | string[];
3504
- commonjs2: string | string[];
3505
- amd?: string | string[] | undefined;
3506
- }> | ((args_0: {
3412
+ externals?: string | RegExp | Record<string, string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue> | ((args_0: {
3507
3413
  request?: string | undefined;
3508
3414
  context?: string | undefined;
3509
3415
  dependencyType?: string | undefined;
3510
3416
  contextInfo?: {
3511
3417
  issuer: string;
3512
3418
  } | undefined;
3513
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | {
3514
- root: string | string[];
3515
- commonjs: string | string[];
3516
- commonjs2: string | string[];
3517
- amd?: string | string[] | undefined;
3518
- } | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
3419
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
3519
3420
  request?: string | undefined;
3520
3421
  context?: string | undefined;
3521
3422
  dependencyType?: string | undefined;
3522
3423
  contextInfo?: {
3523
3424
  issuer: string;
3524
3425
  } | undefined;
3525
- }, ...args: unknown[]) => Promise<string | boolean | string[] | {
3526
- root: string | string[];
3527
- commonjs: string | string[];
3528
- commonjs2: string | string[];
3529
- amd?: string | string[] | undefined;
3530
- }>) | (string | RegExp | Record<string, string | boolean | string[] | {
3531
- root: string | string[];
3532
- commonjs: string | string[];
3533
- commonjs2: string | string[];
3534
- amd?: string | string[] | undefined;
3535
- }> | ((args_0: {
3426
+ }, ...args: unknown[]) => Promise<string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue>) | (string | RegExp | Record<string, string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue> | ((args_0: {
3536
3427
  request?: string | undefined;
3537
3428
  context?: string | undefined;
3538
3429
  dependencyType?: string | undefined;
3539
3430
  contextInfo?: {
3540
3431
  issuer: string;
3541
3432
  } | undefined;
3542
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | {
3543
- root: string | string[];
3544
- commonjs: string | string[];
3545
- commonjs2: string | string[];
3546
- amd?: string | string[] | undefined;
3547
- } | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
3433
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
3548
3434
  request?: string | undefined;
3549
3435
  context?: string | undefined;
3550
3436
  dependencyType?: string | undefined;
3551
3437
  contextInfo?: {
3552
3438
  issuer: string;
3553
3439
  } | undefined;
3554
- }, ...args: unknown[]) => Promise<string | boolean | string[] | {
3555
- root: string | string[];
3556
- commonjs: string | string[];
3557
- commonjs2: string | string[];
3558
- amd?: string | string[] | undefined;
3559
- }>))[] | undefined;
3440
+ }, ...args: unknown[]) => Promise<string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue>))[] | undefined;
3560
3441
  externalsType?: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined;
3561
3442
  externalsPresets?: {
3562
3443
  node?: boolean | undefined;
@@ -4133,65 +4014,35 @@ export declare const rspackOptions: z.ZodObject<{
4133
4014
  } | undefined;
4134
4015
  loader?: Record<string, any> | undefined;
4135
4016
  resolveLoader?: t.ResolveOptions | undefined;
4136
- externals?: string | RegExp | Record<string, string | boolean | string[] | {
4137
- root: string | string[];
4138
- commonjs: string | string[];
4139
- commonjs2: string | string[];
4140
- amd?: string | string[] | undefined;
4141
- }> | ((args_0: {
4017
+ externals?: string | RegExp | Record<string, string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue> | ((args_0: {
4142
4018
  request?: string | undefined;
4143
4019
  context?: string | undefined;
4144
4020
  dependencyType?: string | undefined;
4145
4021
  contextInfo?: {
4146
4022
  issuer: string;
4147
4023
  } | undefined;
4148
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | {
4149
- root: string | string[];
4150
- commonjs: string | string[];
4151
- commonjs2: string | string[];
4152
- amd?: string | string[] | undefined;
4153
- } | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
4024
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
4154
4025
  request?: string | undefined;
4155
4026
  context?: string | undefined;
4156
4027
  dependencyType?: string | undefined;
4157
4028
  contextInfo?: {
4158
4029
  issuer: string;
4159
4030
  } | undefined;
4160
- }, ...args: unknown[]) => Promise<string | boolean | string[] | {
4161
- root: string | string[];
4162
- commonjs: string | string[];
4163
- commonjs2: string | string[];
4164
- amd?: string | string[] | undefined;
4165
- }>) | (string | RegExp | Record<string, string | boolean | string[] | {
4166
- root: string | string[];
4167
- commonjs: string | string[];
4168
- commonjs2: string | string[];
4169
- amd?: string | string[] | undefined;
4170
- }> | ((args_0: {
4031
+ }, ...args: unknown[]) => Promise<string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue>) | (string | RegExp | Record<string, string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue> | ((args_0: {
4171
4032
  request?: string | undefined;
4172
4033
  context?: string | undefined;
4173
4034
  dependencyType?: string | undefined;
4174
4035
  contextInfo?: {
4175
4036
  issuer: string;
4176
4037
  } | undefined;
4177
- }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | {
4178
- root: string | string[];
4179
- commonjs: string | string[];
4180
- commonjs2: string | string[];
4181
- amd?: string | string[] | undefined;
4182
- } | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
4038
+ }, args_1: (args_0: Error | undefined, args_1: string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue | undefined, args_2: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined, ...args: unknown[]) => void, ...args: unknown[]) => unknown) | ((args_0: {
4183
4039
  request?: string | undefined;
4184
4040
  context?: string | undefined;
4185
4041
  dependencyType?: string | undefined;
4186
4042
  contextInfo?: {
4187
4043
  issuer: string;
4188
4044
  } | undefined;
4189
- }, ...args: unknown[]) => Promise<string | boolean | string[] | {
4190
- root: string | string[];
4191
- commonjs: string | string[];
4192
- commonjs2: string | string[];
4193
- amd?: string | string[] | undefined;
4194
- }>))[] | undefined;
4045
+ }, ...args: unknown[]) => Promise<string | boolean | string[] | t.ExternalItemUmdValue | t.ExternalItemObjectValue>))[] | undefined;
4195
4046
  externalsType?: "module" | "global" | "system" | "script" | "commonjs" | "umd" | "amd" | "var" | "jsonp" | "import" | "assign" | "this" | "window" | "self" | "commonjs2" | "commonjs-module" | "commonjs-static" | "amd-require" | "umd2" | "promise" | "module-import" | "node-commonjs" | undefined;
4196
4047
  externalsPresets?: {
4197
4048
  node?: boolean | undefined;
package/dist/exports.d.ts CHANGED
@@ -57,6 +57,8 @@ export { DynamicEntryPlugin } from "./builtin-plugin";
57
57
  export { ExternalsPlugin } from "./builtin-plugin";
58
58
  export { HotModuleReplacementPlugin } from "./builtin-plugin";
59
59
  export { NoEmitOnErrorsPlugin } from "./builtin-plugin";
60
+ export { DllPlugin, type DllPluginOptions } from "./lib/DllPlugin";
61
+ export { DllReferencePlugin, type DllReferencePluginOptions, type DllReferencePluginOptionsSourceType, type DllReferencePluginOptionsContent, type DllReferencePluginOptionsManifest } from "./lib/DllReferencePlugin";
60
62
  export { EnvironmentPlugin } from "./lib/EnvironmentPlugin";
61
63
  export { LoaderOptionsPlugin } from "./lib/LoaderOptionsPlugin";
62
64
  export { LoaderTargetPlugin } from "./lib/LoaderTargetPlugin";