@module-federation/sdk 2.1.0 → 2.2.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.
Files changed (45) hide show
  1. package/README.md +9 -3
  2. package/dist/createModuleFederationConfig.d.ts +0 -2
  3. package/dist/dom.cjs +15 -1
  4. package/dist/dom.cjs.map +1 -1
  5. package/dist/dom.d.ts +0 -2
  6. package/dist/dom.js +15 -1
  7. package/dist/dom.js.map +1 -1
  8. package/dist/env.cjs +3 -1
  9. package/dist/env.cjs.map +1 -1
  10. package/dist/env.d.ts +2 -1
  11. package/dist/env.js +3 -2
  12. package/dist/env.js.map +1 -1
  13. package/dist/generateSnapshotFromManifest.d.ts +0 -2
  14. package/dist/index.cjs +15 -0
  15. package/dist/index.d.ts +4 -3
  16. package/dist/index.js +4 -2
  17. package/dist/node.cjs.map +1 -1
  18. package/dist/node.d.ts +0 -2
  19. package/dist/node.js.map +1 -1
  20. package/dist/types/index.d.ts +2 -1
  21. package/dist/types/plugins/ConsumeSharedPlugin.cjs +13 -0
  22. package/dist/types/plugins/ConsumeSharedPlugin.cjs.map +1 -0
  23. package/dist/types/plugins/ConsumeSharedPlugin.d.ts +109 -0
  24. package/dist/types/plugins/ConsumeSharedPlugin.js +8 -0
  25. package/dist/types/plugins/ConsumeSharedPlugin.js.map +1 -0
  26. package/dist/types/plugins/ContainerPlugin.cjs.map +1 -1
  27. package/dist/types/plugins/ContainerPlugin.d.ts +15 -13
  28. package/dist/types/plugins/ContainerPlugin.js.map +1 -1
  29. package/dist/types/plugins/ContainerReferencePlugin.cjs.map +1 -1
  30. package/dist/types/plugins/ContainerReferencePlugin.d.ts +4 -3
  31. package/dist/types/plugins/ContainerReferencePlugin.js.map +1 -1
  32. package/dist/types/plugins/ModuleFederationPlugin.cjs.map +1 -1
  33. package/dist/types/plugins/ModuleFederationPlugin.d.ts +213 -190
  34. package/dist/types/plugins/ModuleFederationPlugin.js.map +1 -1
  35. package/dist/types/plugins/ProvideSharedPlugin.cjs +13 -0
  36. package/dist/types/plugins/ProvideSharedPlugin.cjs.map +1 -0
  37. package/dist/types/plugins/ProvideSharedPlugin.d.ts +97 -0
  38. package/dist/types/plugins/ProvideSharedPlugin.js +8 -0
  39. package/dist/types/plugins/ProvideSharedPlugin.js.map +1 -0
  40. package/dist/types/plugins/SharePlugin.cjs.map +1 -1
  41. package/dist/types/plugins/SharePlugin.d.ts +9 -12
  42. package/dist/types/plugins/SharePlugin.js.map +1 -1
  43. package/dist/types/plugins/index.d.ts +3 -1
  44. package/dist/utils.d.ts +0 -2
  45. package/package.json +8 -1
@@ -3,12 +3,8 @@ import webpack from "webpack";
3
3
 
4
4
  //#region src/types/plugins/ModuleFederationPlugin.d.ts
5
5
  declare namespace ModuleFederationPlugin_d_exports {
6
- export { AdditionalDataOptions, AmdContainer, AsyncBoundaryOptions, AuxiliaryComment, DataPrefetch, DtsHostOptions, DtsRemoteOptions, EntryRuntime, Exposes, ExposesConfig, ExposesItem, ExposesItems, ExposesObject, ExternalsType, LibraryCustomUmdCommentObject, LibraryCustomUmdObject, LibraryExport, LibraryName, LibraryOptions, LibraryType, ModuleFederationPluginOptions, PluginDevOptions, PluginDtsOptions, PluginManifestOptions, RemoteTypeUrls, Remotes, RemotesConfig, RemotesItem, RemotesItems, RemotesObject, Shared, SharedConfig, SharedItem, SharedObject, SharedStrategy, TreeShakingConfig, UmdNamedDefine };
6
+ export { AdditionalDataOptions, AmdContainer, AsyncBoundaryOptions, AuxiliaryComment, DtsHostOptions, DtsRemoteOptions, EntryRuntime, Exposes, ExposesConfig, ExposesItem, ExposesItems, ExposesObject, ExternalsType, IncludeExcludeOptions, LibraryCustomUmdCommentObject, LibraryCustomUmdObject, LibraryExport, LibraryName, LibraryOptions, LibraryType, ModuleFederationPluginOptions, PluginDevOptions, PluginDtsOptions, PluginManifestOptions, RemoteTypeUrls, Remotes, RemotesConfig, RemotesItem, RemotesItems, RemotesObject, Shared, SharedConfig, SharedItem, SharedObject, SharedStrategy, TreeShakingConfig, UmdNamedDefine };
7
7
  }
8
- /**
9
- * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
10
- */
11
- type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
12
8
  /**
13
9
  * Module that should be exposed by this container.
14
10
  */
@@ -17,6 +13,29 @@ type ExposesItem = string;
17
13
  * Modules that should be exposed by this container.
18
14
  */
19
15
  type ExposesItems = ExposesItem[];
16
+ /**
17
+ * Modules that should be exposed by this container. Property names are used as public paths.
18
+ */
19
+ interface ExposesObject {
20
+ [k: string]: ExposesConfig | ExposesItem | ExposesItems;
21
+ }
22
+ /**
23
+ * Advanced configuration for modules that should be exposed by this container.
24
+ */
25
+ interface ExposesConfig {
26
+ /**
27
+ * Request to a module that should be exposed by this container.
28
+ */
29
+ import: ExposesItem | ExposesItems;
30
+ /**
31
+ * Custom chunk name for the exposed module.
32
+ */
33
+ name?: string;
34
+ }
35
+ /**
36
+ * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.
37
+ */
38
+ type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;
20
39
  /**
21
40
  * Add a container for define/require functions in the AMD module.
22
41
  */
@@ -25,6 +44,44 @@ type AmdContainer = string;
25
44
  * Add a comment in the UMD wrapper.
26
45
  */
27
46
  type AuxiliaryComment = string | LibraryCustomUmdCommentObject;
47
+ /**
48
+ * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
49
+ */
50
+ interface LibraryCustomUmdCommentObject {
51
+ /**
52
+ * Set comment for `amd` section in UMD.
53
+ */
54
+ amd?: string;
55
+ /**
56
+ * Set comment for `commonjs` (exports) section in UMD.
57
+ */
58
+ commonjs?: string;
59
+ /**
60
+ * Set comment for `commonjs2` (module.exports) section in UMD.
61
+ */
62
+ commonjs2?: string;
63
+ /**
64
+ * Set comment for `root` (global variable) section in UMD.
65
+ */
66
+ root?: string;
67
+ }
68
+ /**
69
+ * Description object for all UMD variants of the library name.
70
+ */
71
+ interface LibraryCustomUmdObject {
72
+ /**
73
+ * Name of the exposed AMD library in the UMD.
74
+ */
75
+ amd?: string;
76
+ /**
77
+ * Name of the exposed commonjs export in the UMD.
78
+ */
79
+ commonjs?: string;
80
+ /**
81
+ * Name of the property exposed globally by a UMD library.
82
+ */
83
+ root?: string[] | string;
84
+ }
28
85
  /**
29
86
  * Specify which export should be exposed as library.
30
87
  */
@@ -36,7 +93,18 @@ type LibraryName = string[] | string | LibraryCustomUmdObject;
36
93
  /**
37
94
  * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
38
95
  */
39
- type LibraryType = ('var' | 'module' | 'assign' | 'assign-properties' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system') | string;
96
+ type LibraryType = 'var' | 'module' | 'assign' | 'assign-properties' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | string;
97
+ /**
98
+ * Options for library.
99
+ */
100
+ interface LibraryOptions {
101
+ amdContainer?: AmdContainer;
102
+ auxiliaryComment?: AuxiliaryComment;
103
+ export?: LibraryExport;
104
+ name?: LibraryName;
105
+ type: LibraryType;
106
+ umdNamedDefine?: UmdNamedDefine;
107
+ }
40
108
  /**
41
109
  * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
42
110
  */
@@ -44,11 +112,7 @@ type UmdNamedDefine = boolean;
44
112
  /**
45
113
  * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).
46
114
  */
47
- type ExternalsType = 'var' | 'module' | 'assign' | 'this' | 'window' | 'self' | 'global' | 'commonjs' | 'commonjs2' | 'commonjs-module' | 'commonjs-static' | 'amd' | 'amd-require' | 'umd' | 'umd2' | 'jsonp' | 'system' | 'promise' | 'import' | 'script' | 'module-import' | 'node-commonjs';
48
- /**
49
- * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
50
- */
51
- type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;
115
+ 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';
52
116
  /**
53
117
  * Container location from which modules should be resolved and loaded at runtime.
54
118
  */
@@ -58,21 +122,150 @@ type RemotesItem = string;
58
122
  */
59
123
  type RemotesItems = RemotesItem[];
60
124
  /**
61
- * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
125
+ * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
62
126
  */
63
- type EntryRuntime = false | string;
127
+ interface RemotesObject {
128
+ [k: string]: RemotesConfig | RemotesItem | RemotesItems;
129
+ }
64
130
  /**
65
- * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
131
+ * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
66
132
  */
67
- type Shared = (SharedItem | SharedObject)[] | SharedObject;
133
+ interface RemotesConfig {
134
+ /**
135
+ * Container locations from which modules should be resolved and loaded at runtime.
136
+ */
137
+ external: RemotesItem | RemotesItems;
138
+ /**
139
+ * The name of the share scope shared with this remote.
140
+ */
141
+ shareScope?: string | string[];
142
+ }
143
+ /**
144
+ * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.
145
+ */
146
+ type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;
147
+ /**
148
+ * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.
149
+ */
150
+ type EntryRuntime = false | string;
68
151
  /**
69
152
  * A module that should be shared in the share scope.
70
153
  */
71
154
  type SharedItem = string;
72
155
  /**
73
- * Enable Data Prefetch
156
+ * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
157
+ */
158
+ interface SharedObject {
159
+ [k: string]: SharedConfig | SharedItem;
160
+ }
161
+ /**
162
+ * Advanced configuration for modules that should be shared in the share scope.
163
+ */
164
+ interface SharedConfig {
165
+ /**
166
+ * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
167
+ */
168
+ eager?: boolean;
169
+ /**
170
+ * Options for excluding specific versions or request paths of the shared module. When specified, matching modules will not be shared. Cannot be used with 'include'.
171
+ */
172
+ exclude?: IncludeExcludeOptions;
173
+ /**
174
+ * Options for including only specific versions or request paths of the shared module. When specified, only matching modules will be shared. Cannot be used with 'exclude'.
175
+ */
176
+ include?: IncludeExcludeOptions;
177
+ /**
178
+ * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
179
+ */
180
+ import?: false | SharedItem;
181
+ /**
182
+ * Import request to match on
183
+ */
184
+ request?: string;
185
+ /**
186
+ * Layer in which the shared module should be placed.
187
+ */
188
+ layer?: string;
189
+ /**
190
+ * Layer of the issuer.
191
+ */
192
+ issuerLayer?: string;
193
+ /**
194
+ * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
195
+ */
196
+ packageName?: string;
197
+ /**
198
+ * Version requirement from module in share scope.
199
+ */
200
+ requiredVersion?: false | string;
201
+ /**
202
+ * Module is looked up under this key from the share scope.
203
+ */
204
+ shareKey?: string;
205
+ /**
206
+ * Share scope name.
207
+ */
208
+ shareScope?: string | string[];
209
+ /**
210
+ * [Deprecated]: load shared strategy(defaults to 'version-first').
211
+ */
212
+ shareStrategy?: 'version-first' | 'loaded-first';
213
+ /**
214
+ * Allow only a single version of the shared module in share scope (disabled by default).
215
+ */
216
+ singleton?: boolean;
217
+ /**
218
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
219
+ */
220
+ strictVersion?: boolean;
221
+ /**
222
+ * Version of the provided module. Will replace lower matching versions, but not higher.
223
+ */
224
+ version?: false | string;
225
+ /**
226
+ * Enable reconstructed lookup for node_modules paths for this share item
227
+ */
228
+ allowNodeModulesSuffixMatch?: boolean;
229
+ /**
230
+ * Enable tree-shaking for the shared module or configure it.
231
+ */
232
+ treeShaking?: boolean | TreeShakingConfig;
233
+ }
234
+ /**
235
+ * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.
236
+ */
237
+ type Shared = (SharedItem | SharedObject)[] | SharedObject;
238
+ interface IncludeExcludeOptions {
239
+ /**
240
+ * A string (which can be a regex pattern) or a RegExp object to match the request path.
241
+ */
242
+ request?: string | RegExp;
243
+ /**
244
+ * Semantic versioning range to match against the module's version.
245
+ */
246
+ version?: string;
247
+ /**
248
+ * Semantic versioning range to match against the fallback module's version for exclusion/inclusion context where applicable.
249
+ */
250
+ fallbackVersion?: string;
251
+ }
252
+ /**
253
+ * Tree-shake configuration for shared module.
74
254
  */
75
- type DataPrefetch = boolean;
255
+ interface TreeShakingConfig {
256
+ /**
257
+ * List of export names used from the shared module.
258
+ */
259
+ usedExports?: string[];
260
+ /**
261
+ * Tree-shake analysis mode.
262
+ */
263
+ mode?: 'server-calc' | 'runtime-infer';
264
+ /**
265
+ * Filename for generated treeShaking metadata.
266
+ */
267
+ filename?: string;
268
+ }
76
269
  interface AdditionalDataOptions {
77
270
  stats: Stats;
78
271
  compiler: webpack.Compiler;
@@ -116,6 +309,8 @@ interface DtsRemoteOptions {
116
309
  tsConfigPath?: string;
117
310
  typesFolder?: string;
118
311
  compiledTypesFolder?: string;
312
+ /** Custom base output directory for generated types. When set, types will be emitted to this directory instead of the default compiler output directory. */
313
+ outputDir?: string;
119
314
  deleteTypesFolder?: boolean;
120
315
  additionalFilesToCompile?: string[];
121
316
  compileInChildProcess?: boolean;
@@ -197,7 +392,6 @@ interface ModuleFederationPluginOptions {
197
392
  manifest?: boolean | PluginManifestOptions;
198
393
  dev?: boolean | PluginDevOptions;
199
394
  dts?: boolean | PluginDtsOptions;
200
- dataPrefetch?: DataPrefetch;
201
395
  virtualRuntimeEntry?: boolean;
202
396
  experiments?: {
203
397
  externalRuntime?: boolean;
@@ -255,178 +449,7 @@ interface ModuleFederationPluginOptions {
255
449
  treeShakingSharedExcludePlugins?: string[];
256
450
  treeShakingSharedPlugins?: string[];
257
451
  }
258
- /**
259
- * Modules that should be exposed by this container. Property names are used as public paths.
260
- */
261
- interface ExposesObject {
262
- /**
263
- * Modules that should be exposed by this container.
264
- */
265
- [k: string]: ExposesConfig | ExposesItem | ExposesItems;
266
- }
267
- /**
268
- * Advanced configuration for modules that should be exposed by this container.
269
- */
270
- interface ExposesConfig {
271
- /**
272
- * Request to a module that should be exposed by this container.
273
- */
274
- import: ExposesItem | ExposesItems;
275
- /**
276
- * Custom chunk name for the exposed module.
277
- */
278
- name?: string;
279
- }
280
- /**
281
- * Options for library.
282
- */
283
- interface LibraryOptions {
284
- /**
285
- * Add a container for define/require functions in the AMD module.
286
- */
287
- amdContainer?: AmdContainer;
288
- /**
289
- * Add a comment in the UMD wrapper.
290
- */
291
- auxiliaryComment?: AuxiliaryComment;
292
- /**
293
- * Specify which export should be exposed as library.
294
- */
295
- export?: LibraryExport;
296
- /**
297
- * The name of the library (some types allow unnamed libraries too).
298
- */
299
- name?: LibraryName;
300
- /**
301
- * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).
302
- */
303
- type: LibraryType;
304
- /**
305
- * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.
306
- */
307
- umdNamedDefine?: UmdNamedDefine;
308
- }
309
- /**
310
- * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.
311
- */
312
- interface LibraryCustomUmdCommentObject {
313
- /**
314
- * Set comment for `amd` section in UMD.
315
- */
316
- amd?: string;
317
- /**
318
- * Set comment for `commonjs` (exports) section in UMD.
319
- */
320
- commonjs?: string;
321
- /**
322
- * Set comment for `commonjs2` (module.exports) section in UMD.
323
- */
324
- commonjs2?: string;
325
- /**
326
- * Set comment for `root` (global variable) section in UMD.
327
- */
328
- root?: string;
329
- }
330
- /**
331
- * Description object for all UMD variants of the library name.
332
- */
333
- interface LibraryCustomUmdObject {
334
- /**
335
- * Name of the exposed AMD library in the UMD.
336
- */
337
- amd?: string;
338
- /**
339
- * Name of the exposed commonjs export in the UMD.
340
- */
341
- commonjs?: string;
342
- /**
343
- * Name of the property exposed globally by a UMD library.
344
- */
345
- root?: string[] | string;
346
- }
347
- /**
348
- * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.
349
- */
350
- interface RemotesObject {
351
- /**
352
- * Container locations from which modules should be resolved and loaded at runtime.
353
- */
354
- [k: string]: RemotesConfig | RemotesItem | RemotesItems;
355
- }
356
- /**
357
- * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.
358
- */
359
- interface RemotesConfig {
360
- /**
361
- * Container locations from which modules should be resolved and loaded at runtime.
362
- */
363
- external: RemotesItem | RemotesItems;
364
- /**
365
- * The name of the share scope shared with this remote.
366
- */
367
- shareScope?: string | string[];
368
- }
369
- /**
370
- * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.
371
- */
372
- interface SharedObject {
373
- /**
374
- * Modules that should be shared in the share scope.
375
- */
376
- [k: string]: SharedConfig | SharedItem;
377
- }
378
452
  type SharedStrategy = 'version-first' | 'loaded-first';
379
- type TreeShakingConfig = {
380
- usedExports?: string[];
381
- mode?: 'server-calc' | 'runtime-infer';
382
- filename?: string;
383
- };
384
- /**
385
- * Advanced configuration for modules that should be shared in the share scope.
386
- */
387
- interface SharedConfig {
388
- /**
389
- * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
390
- */
391
- eager?: boolean;
392
- /**
393
- * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.
394
- */
395
- import?: false | SharedItem;
396
- /**
397
- * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.
398
- */
399
- packageName?: string;
400
- /**
401
- * Version requirement from module in share scope.
402
- */
403
- requiredVersion?: false | string;
404
- /**
405
- * Module is looked up under this key from the share scope.
406
- */
407
- shareKey?: string;
408
- /**
409
- * Share scope name.
410
- */
411
- shareScope?: string | string[];
412
- /**
413
- * load shared strategy(defaults to 'version-first').
414
- */
415
- shareStrategy?: SharedStrategy;
416
- /**
417
- * Allow only a single version of the shared module in share scope (disabled by default).
418
- */
419
- singleton?: boolean;
420
- /**
421
- * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
422
- */
423
- strictVersion?: boolean;
424
- /**
425
- * Version of the provided module. Will replace lower matching versions, but not higher.
426
- */
427
- version?: false | string;
428
- treeShaking?: TreeShakingConfig;
429
- }
430
453
  //#endregion
431
- export { DataPrefetch, EntryRuntime, Exposes, ExternalsType, LibraryOptions, ModuleFederationPluginOptions, ModuleFederationPlugin_d_exports, Remotes, Shared };
454
+ export { EntryRuntime, Exposes, ExternalsType, LibraryOptions, ModuleFederationPluginOptions, ModuleFederationPlugin_d_exports, Remotes, Shared };
432
455
  //# sourceMappingURL=ModuleFederationPlugin.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFederationPlugin.js","names":[],"sources":["../../../src/types/plugins/ModuleFederationPlugin.ts"],"sourcesContent":["import type webpack from 'webpack';\nimport { Stats } from '../stats';\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n/**\n * Add a container for define/require functions in the AMD module.\n */\nexport type AmdContainer = string;\n/**\n * Add a comment in the UMD wrapper.\n */\nexport type AuxiliaryComment = string | LibraryCustomUmdCommentObject;\n/**\n * Specify which export should be exposed as library.\n */\nexport type LibraryExport = string[] | string;\n/**\n * The name of the library (some types allow unnamed libraries too).\n */\nexport type LibraryName = string[] | string | LibraryCustomUmdObject;\n/**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\nexport type LibraryType =\n | (\n | 'var'\n | 'module'\n | 'assign'\n | 'assign-properties'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n )\n | string;\n/**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\nexport type UmdNamedDefine = boolean;\n/**\n * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\n */\nexport type ExternalsType =\n | 'var'\n | 'module'\n | 'assign'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n | 'promise'\n | 'import'\n | 'script'\n | 'module-import'\n | 'node-commonjs';\n/**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\nexport type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;\n/**\n * Container location from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItem = string;\n/**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItems = RemotesItem[];\n/**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\nexport type EntryRuntime = false | string;\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n/**\n * Enable Data Prefetch\n */\nexport type DataPrefetch = boolean;\n\nexport interface AdditionalDataOptions {\n stats: Stats;\n compiler: webpack.Compiler;\n compilation: webpack.Compilation;\n bundler: 'webpack' | 'rspack';\n}\nexport interface PluginManifestOptions {\n filePath?: string;\n disableAssetsAnalyze?: boolean;\n fileName?: string;\n additionalData?: (\n options: AdditionalDataOptions,\n ) => Promise<void | Stats> | Stats | void;\n}\n\nexport interface PluginDevOptions {\n disableLiveReload?: boolean;\n disableHotTypesReload?: boolean;\n disableDynamicRemoteTypeHints?: boolean;\n}\n\ninterface RemoteTypeUrl {\n alias?: string;\n api: string;\n zip: string;\n}\n\nexport interface RemoteTypeUrls {\n [remoteName: string]: RemoteTypeUrl;\n}\n\nexport interface DtsHostOptions {\n typesFolder?: string;\n abortOnError?: boolean;\n remoteTypesFolder?: string;\n deleteTypesFolder?: boolean;\n maxRetries?: number;\n consumeAPITypes?: boolean;\n runtimePkgs?: string[];\n remoteTypeUrls?: (() => Promise<RemoteTypeUrls>) | RemoteTypeUrls;\n timeout?: number;\n /** The family of IP, used for network requests */\n family?: 4 | 6;\n typesOnBuild?: boolean;\n}\n\nexport interface DtsRemoteOptions {\n tsConfigPath?: string;\n typesFolder?: string;\n compiledTypesFolder?: string;\n deleteTypesFolder?: boolean;\n additionalFilesToCompile?: string[];\n compileInChildProcess?: boolean;\n compilerInstance?: 'tsc' | 'vue-tsc' | 'tspc' | string;\n generateAPITypes?: boolean;\n extractThirdParty?:\n | boolean\n | {\n exclude?: Array<string | RegExp>;\n };\n extractRemoteTypes?: boolean;\n abortOnError?: boolean;\n deleteTsConfig?: boolean;\n}\n\nexport interface PluginDtsOptions {\n generateTypes?: boolean | DtsRemoteOptions;\n consumeTypes?: boolean | DtsHostOptions;\n tsConfigPath?: string;\n extraOptions?: Record<string, any>;\n implementation?: string;\n cwd?: string;\n displayErrorInTerminal?: boolean;\n}\n\nexport type AsyncBoundaryOptions = {\n eager?: RegExp | ((module: any) => boolean);\n excludeChunk?: (chunk: any) => boolean;\n};\n\nexport interface ModuleFederationPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes?: Exposes;\n /**\n * The filename of the container as relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name of the container.\n */\n name?: string;\n /**\n * The external type of the remote containers.\n */\n remoteType?: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes?: Remotes;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * Share scope name used for all shared modules (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: SharedStrategy;\n /**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\n shared?: Shared;\n /**\n * Runtime plugin file paths or package name. Supports tuple [path, params].\n */\n runtimePlugins?: (string | [string, Record<string, unknown>])[];\n /**\n * Custom public path function\n */\n getPublicPath?: string;\n /**\n * Bundler runtime path\n */\n implementation?: string;\n\n manifest?: boolean | PluginManifestOptions;\n dev?: boolean | PluginDevOptions;\n dts?: boolean | PluginDtsOptions;\n dataPrefetch?: DataPrefetch;\n virtualRuntimeEntry?: boolean;\n experiments?: {\n externalRuntime?: boolean;\n provideExternalRuntime?: boolean;\n asyncStartup?: boolean;\n /**\n * Options related to build optimizations.\n */\n optimization?: {\n /**\n * Enable optimization to skip snapshot plugin\n */\n disableSnapshot?: boolean;\n /**\n * Target environment for the build\n */\n target?: 'web' | 'node';\n };\n };\n bridge?: {\n /**\n * Enables bridge router functionality for React applications.\n * When enabled, automatically handles routing context and basename injection\n * for micro-frontend applications using react-router-dom.\n *\n * @default false\n */\n enableBridgeRouter?: boolean;\n /**\n * @deprecated Use `enableBridgeRouter: false` instead.\n *\n * Disables the default alias setting in the bridge.\n * When true, users must manually handle basename through root component props.\n *\n * Migration:\n * - `disableAlias: true` → `enableBridgeRouter: false`\n * - `disableAlias: false` → `enableBridgeRouter: true`\n *\n * @default false\n */\n disableAlias?: boolean;\n };\n /**\n * Configuration for async boundary plugin\n */\n async?: boolean | AsyncBoundaryOptions;\n\n /**\n * The directory to output the tree shaking shared fallback resources.\n */\n treeShakingDir?: string;\n\n /**\n * Whether to inject shared used exports into bundler runtime.\n */\n injectTreeShakingUsedExports?: boolean;\n treeShakingSharedExcludePlugins?: string[];\n treeShakingSharedPlugins?: string[];\n}\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n /**\n * Modules that should be exposed by this container.\n */\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n/**\n * Options for library.\n */\nexport interface LibraryOptions {\n /**\n * Add a container for define/require functions in the AMD module.\n */\n amdContainer?: AmdContainer;\n /**\n * Add a comment in the UMD wrapper.\n */\n auxiliaryComment?: AuxiliaryComment;\n /**\n * Specify which export should be exposed as library.\n */\n export?: LibraryExport;\n /**\n * The name of the library (some types allow unnamed libraries too).\n */\n name?: LibraryName;\n /**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\n type: LibraryType;\n /**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\n umdNamedDefine?: UmdNamedDefine;\n}\n/**\n * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\n */\nexport interface LibraryCustomUmdCommentObject {\n /**\n * Set comment for `amd` section in UMD.\n */\n amd?: string;\n /**\n * Set comment for `commonjs` (exports) section in UMD.\n */\n commonjs?: string;\n /**\n * Set comment for `commonjs2` (module.exports) section in UMD.\n */\n commonjs2?: string;\n /**\n * Set comment for `root` (global variable) section in UMD.\n */\n root?: string;\n}\n/**\n * Description object for all UMD variants of the library name.\n */\nexport interface LibraryCustomUmdObject {\n /**\n * Name of the exposed AMD library in the UMD.\n */\n amd?: string;\n /**\n * Name of the exposed commonjs export in the UMD.\n */\n commonjs?: string;\n /**\n * Name of the property exposed globally by a UMD library.\n */\n root?: string[] | string;\n}\n/**\n * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.\n */\nexport interface RemotesObject {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n [k: string]: RemotesConfig | RemotesItem | RemotesItems;\n}\n/**\n * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.\n */\nexport interface RemotesConfig {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n external: RemotesItem | RemotesItems;\n /**\n * The name of the share scope shared with this remote.\n */\n shareScope?: string | string[];\n}\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n /**\n * Modules that should be shared in the share scope.\n */\n [k: string]: SharedConfig | SharedItem;\n}\n\nexport type SharedStrategy = 'version-first' | 'loaded-first';\n\nexport type TreeShakingConfig = {\n usedExports?: string[];\n mode?: 'server-calc' | 'runtime-infer';\n filename?: string;\n};\n\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string | string[];\n /**\n * load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: SharedStrategy;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n treeShaking?: TreeShakingConfig;\n}\n"],"mappings":""}
1
+ {"version":3,"file":"ModuleFederationPlugin.js","names":[],"sources":["../../../src/types/plugins/ModuleFederationPlugin.ts"],"sourcesContent":["import type { Stats } from '../stats';\nimport type webpack from 'webpack';\n\n// <-- BEGIN SCHEMA-GENERATED TYPES -->\n/**\n * Module that should be exposed by this container.\n */\nexport type ExposesItem = string;\n\n/**\n * Modules that should be exposed by this container.\n */\nexport type ExposesItems = ExposesItem[];\n\n/**\n * Modules that should be exposed by this container. Property names are used as public paths.\n */\nexport interface ExposesObject {\n [k: string]: ExposesConfig | ExposesItem | ExposesItems;\n}\n\n/**\n * Advanced configuration for modules that should be exposed by this container.\n */\nexport interface ExposesConfig {\n /**\n * Request to a module that should be exposed by this container.\n */\n import: ExposesItem | ExposesItems;\n /**\n * Custom chunk name for the exposed module.\n */\n name?: string;\n}\n\n/**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\nexport type Exposes = (ExposesItem | ExposesObject)[] | ExposesObject;\n\n/**\n * Add a container for define/require functions in the AMD module.\n */\nexport type AmdContainer = string;\n\n/**\n * Add a comment in the UMD wrapper.\n */\nexport type AuxiliaryComment = string | LibraryCustomUmdCommentObject;\n\n/**\n * Set explicit comments for `commonjs`, `commonjs2`, `amd`, and `root`.\n */\nexport interface LibraryCustomUmdCommentObject {\n /**\n * Set comment for `amd` section in UMD.\n */\n amd?: string;\n /**\n * Set comment for `commonjs` (exports) section in UMD.\n */\n commonjs?: string;\n /**\n * Set comment for `commonjs2` (module.exports) section in UMD.\n */\n commonjs2?: string;\n /**\n * Set comment for `root` (global variable) section in UMD.\n */\n root?: string;\n}\n\n/**\n * Description object for all UMD variants of the library name.\n */\nexport interface LibraryCustomUmdObject {\n /**\n * Name of the exposed AMD library in the UMD.\n */\n amd?: string;\n /**\n * Name of the exposed commonjs export in the UMD.\n */\n commonjs?: string;\n /**\n * Name of the property exposed globally by a UMD library.\n */\n root?: string[] | string;\n}\n\n/**\n * Specify which export should be exposed as library.\n */\nexport type LibraryExport = string[] | string;\n\n/**\n * The name of the library (some types allow unnamed libraries too).\n */\nexport type LibraryName = string[] | string | LibraryCustomUmdObject;\n\n/**\n * Type of library (types included by default are 'var', 'module', 'assign', 'assign-properties', 'this', 'window', 'self', 'global', 'commonjs', 'commonjs2', 'commonjs-module', 'commonjs-static', 'amd', 'amd-require', 'umd', 'umd2', 'jsonp', 'system', but others might be added by plugins).\n */\nexport type LibraryType =\n | 'var'\n | 'module'\n | 'assign'\n | 'assign-properties'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n | string;\n\n/**\n * Options for library.\n */\nexport interface LibraryOptions {\n amdContainer?: AmdContainer;\n auxiliaryComment?: AuxiliaryComment;\n export?: LibraryExport;\n name?: LibraryName;\n type: LibraryType;\n umdNamedDefine?: UmdNamedDefine;\n}\n\n/**\n * If `output.libraryTarget` is set to umd and `output.library` is set, setting this to true will name the AMD module.\n */\nexport type UmdNamedDefine = boolean;\n\n/**\n * Specifies the default type of externals ('amd*', 'umd*', 'system' and 'jsonp' depend on output.libraryTarget set to the same value).\n */\nexport type ExternalsType =\n | 'var'\n | 'module'\n | 'assign'\n | 'this'\n | 'window'\n | 'self'\n | 'global'\n | 'commonjs'\n | 'commonjs2'\n | 'commonjs-module'\n | 'commonjs-static'\n | 'amd'\n | 'amd-require'\n | 'umd'\n | 'umd2'\n | 'jsonp'\n | 'system'\n | 'promise'\n | 'import'\n | 'module-import'\n | 'script'\n | 'node-commonjs';\n\n/**\n * Container location from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItem = string;\n\n/**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\nexport type RemotesItems = RemotesItem[];\n\n/**\n * Container locations from which modules should be resolved and loaded at runtime. Property names are used as request scopes.\n */\nexport interface RemotesObject {\n [k: string]: RemotesConfig | RemotesItem | RemotesItems;\n}\n\n/**\n * Advanced configuration for container locations from which modules should be resolved and loaded at runtime.\n */\nexport interface RemotesConfig {\n /**\n * Container locations from which modules should be resolved and loaded at runtime.\n */\n external: RemotesItem | RemotesItems;\n /**\n * The name of the share scope shared with this remote.\n */\n shareScope?: string | string[];\n}\n\n/**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\nexport type Remotes = (RemotesItem | RemotesObject)[] | RemotesObject;\n\n/**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\nexport type EntryRuntime = false | string;\n\n/**\n * A module that should be shared in the share scope.\n */\nexport type SharedItem = string;\n\n/**\n * Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.\n */\nexport interface SharedObject {\n [k: string]: SharedConfig | SharedItem;\n}\n\n/**\n * Advanced configuration for modules that should be shared in the share scope.\n */\nexport interface SharedConfig {\n /**\n * Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Options for excluding specific versions or request paths of the shared module. When specified, matching modules will not be shared. Cannot be used with 'include'.\n */\n exclude?: IncludeExcludeOptions;\n /**\n * Options for including only specific versions or request paths of the shared module. When specified, only matching modules will be shared. Cannot be used with 'exclude'.\n */\n include?: IncludeExcludeOptions;\n /**\n * Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.\n */\n import?: false | SharedItem;\n /**\n * Import request to match on\n */\n request?: string;\n /**\n * Layer in which the shared module should be placed.\n */\n layer?: string;\n /**\n * Layer of the issuer.\n */\n issuerLayer?: string;\n /**\n * Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.\n */\n packageName?: string;\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Module is looked up under this key from the share scope.\n */\n shareKey?: string;\n /**\n * Share scope name.\n */\n shareScope?: string | string[];\n /**\n * [Deprecated]: load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: 'version-first' | 'loaded-first';\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n /**\n * Enable reconstructed lookup for node_modules paths for this share item\n */\n allowNodeModulesSuffixMatch?: boolean;\n /**\n * Enable tree-shaking for the shared module or configure it.\n */\n treeShaking?: boolean | TreeShakingConfig;\n}\n\n/**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\nexport type Shared = (SharedItem | SharedObject)[] | SharedObject;\n\nexport interface IncludeExcludeOptions {\n /**\n * A string (which can be a regex pattern) or a RegExp object to match the request path.\n */\n request?: string | RegExp;\n /**\n * Semantic versioning range to match against the module's version.\n */\n version?: string;\n /**\n * Semantic versioning range to match against the fallback module's version for exclusion/inclusion context where applicable.\n */\n fallbackVersion?: string;\n}\n\n/**\n * Tree-shake configuration for shared module.\n */\nexport interface TreeShakingConfig {\n /**\n * List of export names used from the shared module.\n */\n usedExports?: string[];\n /**\n * Tree-shake analysis mode.\n */\n mode?: 'server-calc' | 'runtime-infer';\n /**\n * Filename for generated treeShaking metadata.\n */\n filename?: string;\n}\n\n// <-- END SCHEMA-GENERATED TYPES -->\n\nexport interface AdditionalDataOptions {\n stats: Stats;\n compiler: webpack.Compiler;\n compilation: webpack.Compilation;\n bundler: 'webpack' | 'rspack';\n}\nexport interface PluginManifestOptions {\n filePath?: string;\n disableAssetsAnalyze?: boolean;\n fileName?: string;\n additionalData?: (\n options: AdditionalDataOptions,\n ) => Promise<void | Stats> | Stats | void;\n}\n\nexport interface PluginDevOptions {\n disableLiveReload?: boolean;\n disableHotTypesReload?: boolean;\n disableDynamicRemoteTypeHints?: boolean;\n}\n\ninterface RemoteTypeUrl {\n alias?: string;\n api: string;\n zip: string;\n}\n\nexport interface RemoteTypeUrls {\n [remoteName: string]: RemoteTypeUrl;\n}\n\nexport interface DtsHostOptions {\n typesFolder?: string;\n abortOnError?: boolean;\n remoteTypesFolder?: string;\n deleteTypesFolder?: boolean;\n maxRetries?: number;\n consumeAPITypes?: boolean;\n runtimePkgs?: string[];\n remoteTypeUrls?: (() => Promise<RemoteTypeUrls>) | RemoteTypeUrls;\n timeout?: number;\n /** The family of IP, used for network requests */\n family?: 4 | 6;\n typesOnBuild?: boolean;\n}\n\nexport interface DtsRemoteOptions {\n tsConfigPath?: string;\n typesFolder?: string;\n compiledTypesFolder?: string;\n /** Custom base output directory for generated types. When set, types will be emitted to this directory instead of the default compiler output directory. */\n outputDir?: string;\n deleteTypesFolder?: boolean;\n additionalFilesToCompile?: string[];\n compileInChildProcess?: boolean;\n compilerInstance?: 'tsc' | 'vue-tsc' | 'tspc' | string;\n generateAPITypes?: boolean;\n extractThirdParty?:\n | boolean\n | {\n exclude?: Array<string | RegExp>;\n };\n extractRemoteTypes?: boolean;\n abortOnError?: boolean;\n deleteTsConfig?: boolean;\n}\n\nexport interface PluginDtsOptions {\n generateTypes?: boolean | DtsRemoteOptions;\n consumeTypes?: boolean | DtsHostOptions;\n tsConfigPath?: string;\n extraOptions?: Record<string, any>;\n implementation?: string;\n cwd?: string;\n displayErrorInTerminal?: boolean;\n}\n\nexport type AsyncBoundaryOptions = {\n eager?: RegExp | ((module: any) => boolean);\n excludeChunk?: (chunk: any) => boolean;\n};\n\nexport interface ModuleFederationPluginOptions {\n /**\n * Modules that should be exposed by this container. When provided, property name is used as public name, otherwise public name is automatically inferred from request.\n */\n exposes?: Exposes;\n /**\n * The filename of the container as relative path inside the `output.path` directory.\n */\n filename?: string;\n /**\n * Options for library.\n */\n library?: LibraryOptions;\n /**\n * The name of the container.\n */\n name?: string;\n /**\n * The external type of the remote containers.\n */\n remoteType?: ExternalsType;\n /**\n * Container locations and request scopes from which modules should be resolved and loaded at runtime. When provided, property name is used as request scope, otherwise request scope is automatically inferred from container location.\n */\n remotes?: Remotes;\n /**\n * The name of the runtime chunk. If set a runtime chunk with this name is created or an existing entrypoint is used as runtime.\n */\n runtime?: EntryRuntime;\n /**\n * Share scope name used for all shared modules (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * load shared strategy(defaults to 'version-first').\n */\n shareStrategy?: SharedStrategy;\n /**\n * Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.\n */\n shared?: Shared;\n /**\n * Runtime plugin file paths or package name. Supports tuple [path, params].\n */\n runtimePlugins?: (string | [string, Record<string, unknown>])[];\n /**\n * Custom public path function\n */\n getPublicPath?: string;\n /**\n * Bundler runtime path\n */\n implementation?: string;\n\n manifest?: boolean | PluginManifestOptions;\n dev?: boolean | PluginDevOptions;\n dts?: boolean | PluginDtsOptions;\n virtualRuntimeEntry?: boolean;\n experiments?: {\n externalRuntime?: boolean;\n provideExternalRuntime?: boolean;\n asyncStartup?: boolean;\n /**\n * Options related to build optimizations.\n */\n optimization?: {\n /**\n * Enable optimization to skip snapshot plugin\n */\n disableSnapshot?: boolean;\n /**\n * Target environment for the build\n */\n target?: 'web' | 'node';\n };\n };\n bridge?: {\n /**\n * Enables bridge router functionality for React applications.\n * When enabled, automatically handles routing context and basename injection\n * for micro-frontend applications using react-router-dom.\n *\n * @default false\n */\n enableBridgeRouter?: boolean;\n /**\n * @deprecated Use `enableBridgeRouter: false` instead.\n *\n * Disables the default alias setting in the bridge.\n * When true, users must manually handle basename through root component props.\n *\n * Migration:\n * - `disableAlias: true` → `enableBridgeRouter: false`\n * - `disableAlias: false` → `enableBridgeRouter: true`\n *\n * @default false\n */\n disableAlias?: boolean;\n };\n /**\n * Configuration for async boundary plugin\n */\n async?: boolean | AsyncBoundaryOptions;\n\n /**\n * The directory to output the tree shaking shared fallback resources.\n */\n treeShakingDir?: string;\n\n /**\n * Whether to inject shared used exports into bundler runtime.\n */\n injectTreeShakingUsedExports?: boolean;\n treeShakingSharedExcludePlugins?: string[];\n treeShakingSharedPlugins?: string[];\n}\n\nexport type SharedStrategy = 'version-first' | 'loaded-first';\n"],"mappings":""}
@@ -0,0 +1,13 @@
1
+ const require_runtime = require('../../_virtual/_rolldown/runtime.cjs');
2
+
3
+ //#region src/types/plugins/ProvideSharedPlugin.ts
4
+ var ProvideSharedPlugin_exports = /* @__PURE__ */ require_runtime.__exportAll({});
5
+
6
+ //#endregion
7
+ Object.defineProperty(exports, 'ProvideSharedPlugin_exports', {
8
+ enumerable: true,
9
+ get: function () {
10
+ return ProvideSharedPlugin_exports;
11
+ }
12
+ });
13
+ //# sourceMappingURL=ProvideSharedPlugin.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ProvideSharedPlugin.cjs","names":[],"sources":["../../../src/types/plugins/ProvideSharedPlugin.ts"],"sourcesContent":["/*\n * This file was automatically generated.\n * DO NOT MODIFY BY HAND.\n * Run `pnpm generate:schema -w` to update.\n */\n\nimport type { IncludeExcludeOptions } from './ConsumeSharedPlugin';\n\n/**\n * Request to a module that should be provided as shared module to the share scope (will be resolved when relative).\n */\nexport type ProvidesItem = string;\n\n/**\n * Advanced configuration for modules that should be provided as shared modules to the share scope.\n */\nexport interface ProvidesConfig {\n /**\n * Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.\n */\n eager?: boolean;\n /**\n * Key in the share scope under which the shared modules should be stored.\n */\n shareKey?: string;\n /**\n * Import request to match on\n */\n request?: string;\n /**\n * Share scope name.\n */\n shareScope?: string | string[];\n /**\n * Version requirement from module in share scope.\n */\n requiredVersion?: false | string;\n /**\n * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).\n */\n strictVersion?: boolean;\n /**\n * Allow only a single version of the shared module in share scope (disabled by default).\n */\n singleton?: boolean;\n /**\n * Layer in which the shared module should be placed.\n */\n layer?: string;\n /**\n * Layer of the issuer.\n */\n issuerLayer?: string;\n /**\n * Version of the provided module. Will replace lower matching versions, but not higher.\n */\n version?: false | string;\n /**\n * Filter for the shared module.\n */\n exclude?: IncludeExcludeOptions;\n /**\n * Options for including only certain versions or requests of the provided module. Cannot be used with 'exclude'.\n */\n include?: IncludeExcludeOptions;\n /**\n * Enable reconstructed lookup for node_modules paths for this share item\n */\n allowNodeModulesSuffixMatch?: boolean;\n /**\n * Tree shaking mode for the shared module.\n */\n treeShakingMode?: 'server-calc' | 'runtime-infer';\n}\n\n/**\n * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.\n */\nexport interface ProvidesObject {\n [k: string]: ProvidesConfig | ProvidesItem;\n}\n\n/**\n * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.\n */\nexport type Provides = (ProvidesItem | ProvidesObject)[] | ProvidesObject;\n\nexport interface ProvideSharedPluginOptions {\n provides: Provides;\n /**\n * Share scope name used for all provided modules (defaults to 'default').\n */\n shareScope?: string | string[];\n /**\n * Experimental features configuration\n */\n experiments?: {\n /** Enable reconstructed lookup for node_modules paths */\n allowNodeModulesSuffixMatch?: boolean;\n };\n}\n"],"mappings":""}
@@ -0,0 +1,97 @@
1
+ import { IncludeExcludeOptions } from "./ConsumeSharedPlugin.js";
2
+
3
+ //#region src/types/plugins/ProvideSharedPlugin.d.ts
4
+ declare namespace ProvideSharedPlugin_d_exports {
5
+ export { ProvideSharedPluginOptions, Provides, ProvidesConfig, ProvidesItem, ProvidesObject };
6
+ }
7
+ /**
8
+ * Request to a module that should be provided as shared module to the share scope (will be resolved when relative).
9
+ */
10
+ type ProvidesItem = string;
11
+ /**
12
+ * Advanced configuration for modules that should be provided as shared modules to the share scope.
13
+ */
14
+ interface ProvidesConfig {
15
+ /**
16
+ * Include the provided module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.
17
+ */
18
+ eager?: boolean;
19
+ /**
20
+ * Key in the share scope under which the shared modules should be stored.
21
+ */
22
+ shareKey?: string;
23
+ /**
24
+ * Import request to match on
25
+ */
26
+ request?: string;
27
+ /**
28
+ * Share scope name.
29
+ */
30
+ shareScope?: string | string[];
31
+ /**
32
+ * Version requirement from module in share scope.
33
+ */
34
+ requiredVersion?: false | string;
35
+ /**
36
+ * Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).
37
+ */
38
+ strictVersion?: boolean;
39
+ /**
40
+ * Allow only a single version of the shared module in share scope (disabled by default).
41
+ */
42
+ singleton?: boolean;
43
+ /**
44
+ * Layer in which the shared module should be placed.
45
+ */
46
+ layer?: string;
47
+ /**
48
+ * Layer of the issuer.
49
+ */
50
+ issuerLayer?: string;
51
+ /**
52
+ * Version of the provided module. Will replace lower matching versions, but not higher.
53
+ */
54
+ version?: false | string;
55
+ /**
56
+ * Filter for the shared module.
57
+ */
58
+ exclude?: IncludeExcludeOptions;
59
+ /**
60
+ * Options for including only certain versions or requests of the provided module. Cannot be used with 'exclude'.
61
+ */
62
+ include?: IncludeExcludeOptions;
63
+ /**
64
+ * Enable reconstructed lookup for node_modules paths for this share item
65
+ */
66
+ allowNodeModulesSuffixMatch?: boolean;
67
+ /**
68
+ * Tree shaking mode for the shared module.
69
+ */
70
+ treeShakingMode?: 'server-calc' | 'runtime-infer';
71
+ }
72
+ /**
73
+ * Modules that should be provided as shared modules to the share scope. Property names are used as share keys.
74
+ */
75
+ interface ProvidesObject {
76
+ [k: string]: ProvidesConfig | ProvidesItem;
77
+ }
78
+ /**
79
+ * Modules that should be provided as shared modules to the share scope. When provided, property name is used to match modules, otherwise this is automatically inferred from share key.
80
+ */
81
+ type Provides = (ProvidesItem | ProvidesObject)[] | ProvidesObject;
82
+ interface ProvideSharedPluginOptions {
83
+ provides: Provides;
84
+ /**
85
+ * Share scope name used for all provided modules (defaults to 'default').
86
+ */
87
+ shareScope?: string | string[];
88
+ /**
89
+ * Experimental features configuration
90
+ */
91
+ experiments?: {
92
+ /** Enable reconstructed lookup for node_modules paths */allowNodeModulesSuffixMatch?: boolean;
93
+ };
94
+ }
95
+ //#endregion
96
+ export { ProvideSharedPlugin_d_exports };
97
+ //# sourceMappingURL=ProvideSharedPlugin.d.ts.map