@module-federation/manifest 2.6.0 → 2.8.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.
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,7 +49,6 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
@@ -152,9 +154,9 @@ class ManifestManager {
152
154
 
153
155
 
154
156
  exports.ManifestManager = __webpack_exports__.ManifestManager;
155
- for(var __webpack_i__ in __webpack_exports__) {
156
- if(["ManifestManager"].indexOf(__webpack_i__) === -1) {
157
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
157
+ for(var __rspack_i in __webpack_exports__) {
158
+ if(["ManifestManager"].indexOf(__rspack_i) === -1) {
159
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
158
160
  }
159
161
  }
160
162
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3,15 +3,10 @@ import { getManifestFileName } from "@module-federation/sdk";
3
3
  import { isDev } from "./utils.mjs";
4
4
  import logger from "./logger.mjs";
5
5
 
6
- ;// CONCATENATED MODULE: external "node:util"
7
6
 
8
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
9
7
 
10
- ;// CONCATENATED MODULE: external "./utils.mjs"
11
8
 
12
- ;// CONCATENATED MODULE: external "./logger.mjs"
13
9
 
14
- ;// CONCATENATED MODULE: ./src/ManifestManager.ts
15
10
 
16
11
 
17
12
 
@@ -1,5 +1,5 @@
1
1
  import { StatsExpose, StatsRemote, StatsShared, moduleFederationPlugin } from '@module-federation/sdk';
2
- import type { StatsModule } from '../../../webpack/lib/stats/DefaultStatsFactoryPlugin.d';
2
+ import type { StatsModule } from 'webpack/lib/stats/DefaultStatsFactoryPlugin';
3
3
  import type managerTypes from '@module-federation/managers';
4
4
  export declare const getExposeName: (exposeKey: string) => string;
5
5
  export declare function getExposeItem({ exposeKey, name, file, }: {
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,17 +49,16 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
53
55
 
54
56
  // EXPORTS
55
57
  __webpack_require__.d(__webpack_exports__, {
56
- getExposeItem: () => (/* binding */ getExposeItem),
57
58
  ModuleHandler: () => (/* binding */ ModuleHandler),
58
- getShareItem: () => (/* binding */ getShareItem),
59
- getExposeName: () => (/* binding */ getExposeName)
59
+ getExposeItem: () => (/* binding */ getExposeItem),
60
+ getExposeName: () => (/* binding */ getExposeName),
61
+ getShareItem: () => (/* binding */ getShareItem)
60
62
  });
61
63
 
62
64
  ;// CONCATENATED MODULE: external "@module-federation/sdk"
@@ -73,6 +75,7 @@ const external_utils_js_namespaceObject = require("./utils.js");
73
75
 
74
76
 
75
77
 
78
+ const REMOTE_REFERENCE_PREFIX = /^(?:webpack|rspack)\/container\/reference\//;
76
79
  const isNonEmptyString = (value)=>{
77
80
  return typeof value === 'string' && value.trim().length > 0;
78
81
  };
@@ -96,7 +99,7 @@ const normalizeExposeValue = (exposeValue)=>{
96
99
  if ('import' in exposeValue) {
97
100
  const { import: rawImport, name } = exposeValue;
98
101
  const normalizedImport = toImportArray(rawImport);
99
- if (!(normalizedImport === null || normalizedImport === void 0 ? void 0 : normalizedImport.length)) {
102
+ if (!normalizedImport?.length) {
100
103
  return undefined;
101
104
  }
102
105
  return {
@@ -109,7 +112,7 @@ const normalizeExposeValue = (exposeValue)=>{
109
112
  return undefined;
110
113
  }
111
114
  const normalizedImport = toImportArray(exposeValue);
112
- if (!(normalizedImport === null || normalizedImport === void 0 ? void 0 : normalizedImport.length)) {
115
+ if (!normalizedImport?.length) {
113
116
  return undefined;
114
117
  }
115
118
  return {
@@ -185,7 +188,7 @@ const getShareItem = ({ pkgName, normalizedShareOptions, pkgVersion, hostName })
185
188
  return {
186
189
  ...normalizedShareOptions,
187
190
  id: `${hostName}:${pkgName}`,
188
- requiredVersion: (normalizedShareOptions === null || normalizedShareOptions === void 0 ? void 0 : normalizedShareOptions.requiredVersion) || `^${pkgVersion}`,
191
+ requiredVersion: normalizedShareOptions?.requiredVersion || `^${pkgVersion}`,
189
192
  name: pkgName,
190
193
  version: pkgVersion,
191
194
  assets: {
@@ -326,11 +329,11 @@ class ModuleHandler {
326
329
  return;
327
330
  }
328
331
  const remoteManagerNormalizedOptions = this._remoteManager.normalizedOptions;
329
- // identifier = remote (default) webpack/container/reference/app2 ./Button
332
+ // identifier = remote (default) [webpack|rspack]/container/reference/app2 ./Button
330
333
  const data = identifier.split(' ');
331
334
  if (data.length === 4) {
332
335
  const moduleName = data[3].replace('./', '');
333
- const remoteAlias = data[2].replace('webpack/container/reference/', '');
336
+ const remoteAlias = data[2].replace(REMOTE_REFERENCE_PREFIX, '');
334
337
  const normalizedRemote = remoteManagerNormalizedOptions[remoteAlias];
335
338
  const basicRemote = {
336
339
  alias: normalizedRemote.alias,
@@ -391,7 +394,7 @@ class ModuleHandler {
391
394
  const exposes = this._containerManager.containerPluginExposesOptions;
392
395
  const normalizedEntries = Object.entries(exposes).reduce((acc, [exposeKey, exposeOptions])=>{
393
396
  const normalizedExpose = normalizeExposeValue(exposeOptions);
394
- if (!(normalizedExpose === null || normalizedExpose === void 0 ? void 0 : normalizedExpose.import.length)) {
397
+ if (!normalizedExpose?.import.length) {
395
398
  return acc;
396
399
  }
397
400
  acc.push([
@@ -409,7 +412,7 @@ class ModuleHandler {
409
412
  }
410
413
  const normalizedFromOptions = Object.entries(rawExposes).reduce((acc, [exposeKey, exposeOptions])=>{
411
414
  const normalizedExpose = normalizeExposeValue(exposeOptions);
412
- if (!(normalizedExpose === null || normalizedExpose === void 0 ? void 0 : normalizedExpose.import.length)) {
415
+ if (!normalizedExpose?.import.length) {
413
416
  return acc;
414
417
  }
415
418
  acc.push([
@@ -426,8 +429,7 @@ class ModuleHandler {
426
429
  }
427
430
  const exposes = this._containerManager.containerPluginExposesOptions;
428
431
  Object.entries(exposes).forEach(([exposeKey, exposeOptions])=>{
429
- var _exposeOptions_import;
430
- if (!((_exposeOptions_import = exposeOptions.import) === null || _exposeOptions_import === void 0 ? void 0 : _exposeOptions_import.length)) {
432
+ if (!exposeOptions.import?.length) {
431
433
  return;
432
434
  }
433
435
  const [exposeImport] = exposeOptions.import;
@@ -504,9 +506,9 @@ exports.ModuleHandler = __webpack_exports__.ModuleHandler;
504
506
  exports.getExposeItem = __webpack_exports__.getExposeItem;
505
507
  exports.getExposeName = __webpack_exports__.getExposeName;
506
508
  exports.getShareItem = __webpack_exports__.getShareItem;
507
- for(var __webpack_i__ in __webpack_exports__) {
508
- if(["ModuleHandler","getExposeItem","getExposeName","getShareItem"].indexOf(__webpack_i__) === -1) {
509
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
509
+ for(var __rspack_i in __webpack_exports__) {
510
+ if(["ModuleHandler","getExposeItem","getExposeName","getShareItem"].indexOf(__rspack_i) === -1) {
511
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
510
512
  }
511
513
  }
512
514
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -3,19 +3,15 @@ import path from "path";
3
3
  import { ContainerManager, RemoteManager, SharedManager } from "@module-federation/managers";
4
4
  import { getFileNameWithOutExt } from "./utils.mjs";
5
5
 
6
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
7
6
 
8
- ;// CONCATENATED MODULE: external "path"
9
7
 
10
- ;// CONCATENATED MODULE: external "@module-federation/managers"
11
8
 
12
- ;// CONCATENATED MODULE: external "./utils.mjs"
13
9
 
14
- ;// CONCATENATED MODULE: ./src/ModuleHandler.ts
15
10
 
16
11
 
17
12
 
18
13
 
14
+ const REMOTE_REFERENCE_PREFIX = /^(?:webpack|rspack)\/container\/reference\//;
19
15
  const isNonEmptyString = (value)=>{
20
16
  return typeof value === 'string' && value.trim().length > 0;
21
17
  };
@@ -39,7 +35,7 @@ const normalizeExposeValue = (exposeValue)=>{
39
35
  if ('import' in exposeValue) {
40
36
  const { import: rawImport, name } = exposeValue;
41
37
  const normalizedImport = toImportArray(rawImport);
42
- if (!(normalizedImport === null || normalizedImport === void 0 ? void 0 : normalizedImport.length)) {
38
+ if (!normalizedImport?.length) {
43
39
  return undefined;
44
40
  }
45
41
  return {
@@ -52,7 +48,7 @@ const normalizeExposeValue = (exposeValue)=>{
52
48
  return undefined;
53
49
  }
54
50
  const normalizedImport = toImportArray(exposeValue);
55
- if (!(normalizedImport === null || normalizedImport === void 0 ? void 0 : normalizedImport.length)) {
51
+ if (!normalizedImport?.length) {
56
52
  return undefined;
57
53
  }
58
54
  return {
@@ -128,7 +124,7 @@ const getShareItem = ({ pkgName, normalizedShareOptions, pkgVersion, hostName })
128
124
  return {
129
125
  ...normalizedShareOptions,
130
126
  id: `${hostName}:${pkgName}`,
131
- requiredVersion: (normalizedShareOptions === null || normalizedShareOptions === void 0 ? void 0 : normalizedShareOptions.requiredVersion) || `^${pkgVersion}`,
127
+ requiredVersion: normalizedShareOptions?.requiredVersion || `^${pkgVersion}`,
132
128
  name: pkgName,
133
129
  version: pkgVersion,
134
130
  assets: {
@@ -269,11 +265,11 @@ class ModuleHandler {
269
265
  return;
270
266
  }
271
267
  const remoteManagerNormalizedOptions = this._remoteManager.normalizedOptions;
272
- // identifier = remote (default) webpack/container/reference/app2 ./Button
268
+ // identifier = remote (default) [webpack|rspack]/container/reference/app2 ./Button
273
269
  const data = identifier.split(' ');
274
270
  if (data.length === 4) {
275
271
  const moduleName = data[3].replace('./', '');
276
- const remoteAlias = data[2].replace('webpack/container/reference/', '');
272
+ const remoteAlias = data[2].replace(REMOTE_REFERENCE_PREFIX, '');
277
273
  const normalizedRemote = remoteManagerNormalizedOptions[remoteAlias];
278
274
  const basicRemote = {
279
275
  alias: normalizedRemote.alias,
@@ -334,7 +330,7 @@ class ModuleHandler {
334
330
  const exposes = this._containerManager.containerPluginExposesOptions;
335
331
  const normalizedEntries = Object.entries(exposes).reduce((acc, [exposeKey, exposeOptions])=>{
336
332
  const normalizedExpose = normalizeExposeValue(exposeOptions);
337
- if (!(normalizedExpose === null || normalizedExpose === void 0 ? void 0 : normalizedExpose.import.length)) {
333
+ if (!normalizedExpose?.import.length) {
338
334
  return acc;
339
335
  }
340
336
  acc.push([
@@ -352,7 +348,7 @@ class ModuleHandler {
352
348
  }
353
349
  const normalizedFromOptions = Object.entries(rawExposes).reduce((acc, [exposeKey, exposeOptions])=>{
354
350
  const normalizedExpose = normalizeExposeValue(exposeOptions);
355
- if (!(normalizedExpose === null || normalizedExpose === void 0 ? void 0 : normalizedExpose.import.length)) {
351
+ if (!normalizedExpose?.import.length) {
356
352
  return acc;
357
353
  }
358
354
  acc.push([
@@ -369,8 +365,7 @@ class ModuleHandler {
369
365
  }
370
366
  const exposes = this._containerManager.containerPluginExposesOptions;
371
367
  Object.entries(exposes).forEach(([exposeKey, exposeOptions])=>{
372
- var _exposeOptions_import;
373
- if (!((_exposeOptions_import = exposeOptions.import) === null || _exposeOptions_import === void 0 ? void 0 : _exposeOptions_import.length)) {
368
+ if (!exposeOptions.import?.length) {
374
369
  return;
375
370
  }
376
371
  const [exposeImport] = exposeOptions.import;
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,7 +49,6 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
@@ -109,7 +111,6 @@ class StatsManager {
109
111
  return metaData;
110
112
  }
111
113
  _getMetaData(compiler, compilation, extraOptions) {
112
- var _this__options_library, _this__options;
113
114
  const { context } = compiler.options;
114
115
  const { _options: { name } } = this;
115
116
  const buildInfo = this.getBuildInfo(context, compilation.options.target || '');
@@ -139,8 +140,8 @@ class StatsManager {
139
140
  remoteEntry: {
140
141
  name: getRemoteEntryName(),
141
142
  path: '',
142
- // same as the types supported by runtime, currently only global/var/script is supported
143
- type: ((_this__options = this._options) === null || _this__options === void 0 ? void 0 : (_this__options_library = _this__options.library) === null || _this__options_library === void 0 ? void 0 : _this__options_library.type) || 'global'
143
+ // The runtime loader type follows the configured container library type.
144
+ type: this._options?.library?.type || 'global'
144
145
  },
145
146
  types: (0,external_utils_js_namespaceObject.getTypesMetaInfo)(this._options, compiler.context),
146
147
  globalName: globalName,
@@ -487,6 +488,13 @@ class StatsManager {
487
488
  }
488
489
  updateStats(stats, compiler) {
489
490
  const { metaData } = stats;
491
+ const configuredRemoteEntryType = this._options.library?.type;
492
+ if (configuredRemoteEntryType && metaData.remoteEntry) {
493
+ // Rspack may pre-emit stats with the default `global` type even when
494
+ // the configured container library and emitted remote entry are ESM.
495
+ // The configured library is authoritative for runtime loader selection.
496
+ metaData.remoteEntry.type = configuredRemoteEntryType;
497
+ }
490
498
  if (!metaData.types) {
491
499
  metaData.types = (0,external_utils_js_namespaceObject.getTypesMetaInfo)(this._options, compiler.context);
492
500
  }
@@ -527,9 +535,9 @@ class StatsManager {
527
535
 
528
536
 
529
537
  exports.StatsManager = __webpack_exports__.StatsManager;
530
- for(var __webpack_i__ in __webpack_exports__) {
531
- if(["StatsManager"].indexOf(__webpack_i__) === -1) {
532
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
538
+ for(var __rspack_i in __webpack_exports__) {
539
+ if(["StatsManager"].indexOf(__rspack_i) === -1) {
540
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
533
541
  }
534
542
  }
535
543
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -5,19 +5,12 @@ import { ContainerManager, PKGJsonManager, RemoteManager, SharedManager, UNKNOWN
5
5
  import { HOT_UPDATE_SUFFIX } from "./constants.mjs";
6
6
  import { ModuleHandler, getExposeItem, getExposeName, getShareItem } from "./ModuleHandler.mjs";
7
7
 
8
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
9
8
 
10
- ;// CONCATENATED MODULE: external "./utils.mjs"
11
9
 
12
- ;// CONCATENATED MODULE: external "./logger.mjs"
13
10
 
14
- ;// CONCATENATED MODULE: external "@module-federation/managers"
15
11
 
16
- ;// CONCATENATED MODULE: external "./constants.mjs"
17
12
 
18
- ;// CONCATENATED MODULE: external "./ModuleHandler.mjs"
19
13
 
20
- ;// CONCATENATED MODULE: ./src/StatsManager.ts
21
14
  /* eslint-disable max-lines-per-function */ /* eslint-disable @typescript-eslint/member-ordering */ /* eslint-disable max-depth */
22
15
 
23
16
 
@@ -57,7 +50,6 @@ class StatsManager {
57
50
  return metaData;
58
51
  }
59
52
  _getMetaData(compiler, compilation, extraOptions) {
60
- var _this__options_library, _this__options;
61
53
  const { context } = compiler.options;
62
54
  const { _options: { name } } = this;
63
55
  const buildInfo = this.getBuildInfo(context, compilation.options.target || '');
@@ -87,8 +79,8 @@ class StatsManager {
87
79
  remoteEntry: {
88
80
  name: getRemoteEntryName(),
89
81
  path: '',
90
- // same as the types supported by runtime, currently only global/var/script is supported
91
- type: ((_this__options = this._options) === null || _this__options === void 0 ? void 0 : (_this__options_library = _this__options.library) === null || _this__options_library === void 0 ? void 0 : _this__options_library.type) || 'global'
82
+ // The runtime loader type follows the configured container library type.
83
+ type: this._options?.library?.type || 'global'
92
84
  },
93
85
  types: getTypesMetaInfo(this._options, compiler.context),
94
86
  globalName: globalName,
@@ -435,6 +427,13 @@ class StatsManager {
435
427
  }
436
428
  updateStats(stats, compiler) {
437
429
  const { metaData } = stats;
430
+ const configuredRemoteEntryType = this._options.library?.type;
431
+ if (configuredRemoteEntryType && metaData.remoteEntry) {
432
+ // Rspack may pre-emit stats with the default `global` type even when
433
+ // the configured container library and emitted remote entry are ESM.
434
+ // The configured library is authoritative for runtime loader selection.
435
+ metaData.remoteEntry.type = configuredRemoteEntryType;
436
+ }
438
437
  if (!metaData.types) {
439
438
  metaData.types = getTypesMetaInfo(this._options, compiler.context);
440
439
  }
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,7 +49,6 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
@@ -163,9 +165,9 @@ class StatsPlugin {
163
165
  }
164
166
 
165
167
  exports.StatsPlugin = __webpack_exports__.StatsPlugin;
166
- for(var __webpack_i__ in __webpack_exports__) {
167
- if(["StatsPlugin"].indexOf(__webpack_i__) === -1) {
168
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
168
+ for(var __rspack_i in __webpack_exports__) {
169
+ if(["StatsPlugin"].indexOf(__rspack_i) === -1) {
170
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
169
171
  }
170
172
  }
171
173
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -4,17 +4,11 @@ import { StatsManager } from "./StatsManager.mjs";
4
4
  import { PLUGIN_IDENTIFIER } from "./constants.mjs";
5
5
  import logger from "./logger.mjs";
6
6
 
7
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
8
7
 
9
- ;// CONCATENATED MODULE: external "./ManifestManager.mjs"
10
8
 
11
- ;// CONCATENATED MODULE: external "./StatsManager.mjs"
12
9
 
13
- ;// CONCATENATED MODULE: external "./constants.mjs"
14
10
 
15
- ;// CONCATENATED MODULE: external "./logger.mjs"
16
11
 
17
- ;// CONCATENATED MODULE: ./src/StatsPlugin.ts
18
12
 
19
13
 
20
14
 
package/dist/constants.js CHANGED
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,21 +37,22 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  __webpack_require__.r(__webpack_exports__);
40
- __webpack_require__.d(__webpack_exports__, {
41
- HOT_UPDATE_SUFFIX: () => (HOT_UPDATE_SUFFIX),
42
- PLUGIN_IDENTIFIER: () => (PLUGIN_IDENTIFIER)
43
- });
44
42
  const PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
45
43
  const HOT_UPDATE_SUFFIX = '.hot-update';
46
44
 
45
+ __webpack_require__.d(__webpack_exports__, {
46
+ }, {
47
+ HOT_UPDATE_SUFFIX: HOT_UPDATE_SUFFIX,
48
+ PLUGIN_IDENTIFIER: PLUGIN_IDENTIFIER
49
+ });
50
+
47
51
  exports.HOT_UPDATE_SUFFIX = __webpack_exports__.HOT_UPDATE_SUFFIX;
48
52
  exports.PLUGIN_IDENTIFIER = __webpack_exports__.PLUGIN_IDENTIFIER;
49
- for(var __webpack_i__ in __webpack_exports__) {
50
- if(["HOT_UPDATE_SUFFIX","PLUGIN_IDENTIFIER"].indexOf(__webpack_i__) === -1) {
51
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
53
+ for(var __rspack_i in __webpack_exports__) {
54
+ if(["HOT_UPDATE_SUFFIX","PLUGIN_IDENTIFIER"].indexOf(__rspack_i) === -1) {
55
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
52
56
  }
53
57
  }
54
58
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,5 +1,3 @@
1
-
2
- ;// CONCATENATED MODULE: ./src/constants.ts
3
1
  const PLUGIN_IDENTIFIER = 'Module Federation Manifest Plugin';
4
2
  const HOT_UPDATE_SUFFIX = '.hot-update';
5
3
 
package/dist/index.js CHANGED
@@ -7,25 +7,24 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
7
7
  })();
8
8
  ;
9
9
  var __webpack_modules__ = ({
10
- "./ManifestManager": (function (module) {
10
+ "./ManifestManager"(module) {
11
11
  module.exports = require("./ManifestManager.js");
12
12
 
13
- }),
14
- "./StatsManager": (function (module) {
13
+ },
14
+ "./StatsManager"(module) {
15
15
  module.exports = require("./StatsManager.js");
16
16
 
17
- }),
18
- "./StatsPlugin": (function (module) {
17
+ },
18
+ "./StatsPlugin"(module) {
19
19
  module.exports = require("./StatsPlugin.js");
20
20
 
21
- }),
22
- "./types": (function (module) {
21
+ },
22
+ "./types"(module) {
23
23
  module.exports = require("./types.js");
24
24
 
25
- }),
25
+ },
26
26
 
27
27
  });
28
- /************************************************************************/
29
28
  // The module cache
30
29
  var __webpack_module_cache__ = {};
31
30
 
@@ -49,7 +48,6 @@ return module.exports;
49
48
 
50
49
  }
51
50
 
52
- /************************************************************************/
53
51
  // webpack/runtime/compat_get_default_export
54
52
  (() => {
55
53
  // getDefaultExport function for compatibility with non-ESM modules
@@ -64,12 +62,16 @@ __webpack_require__.n = (module) => {
64
62
  })();
65
63
  // webpack/runtime/define_property_getters
66
64
  (() => {
67
- __webpack_require__.d = (exports, definition) => {
68
- for(var key in definition) {
69
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
70
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
71
- }
72
- }
65
+ __webpack_require__.d = (exports, getters, values) => {
66
+ var define = (defs, kind) => {
67
+ for(var key in defs) {
68
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
69
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
70
+ }
71
+ }
72
+ };
73
+ define(getters, "get");
74
+ define(values, "value");
73
75
  };
74
76
  })();
75
77
  // webpack/runtime/has_own_property
@@ -86,41 +88,41 @@ __webpack_require__.r = (exports) => {
86
88
  Object.defineProperty(exports, '__esModule', { value: true });
87
89
  };
88
90
  })();
89
- /************************************************************************/
90
91
  var __webpack_exports__ = {};
91
92
  // This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
92
93
  (() => {
93
94
  __webpack_require__.r(__webpack_exports__);
94
- __webpack_require__.d(__webpack_exports__, {
95
- ManifestManager: () => (/* reexport safe */ _ManifestManager__WEBPACK_IMPORTED_MODULE_1__.ManifestManager),
96
- StatsManager: () => (/* reexport safe */ _StatsManager__WEBPACK_IMPORTED_MODULE_2__.StatsManager),
97
- StatsPlugin: () => (/* reexport safe */ _StatsPlugin__WEBPACK_IMPORTED_MODULE_0__.StatsPlugin)
98
- });
99
- /* ESM import */var _StatsPlugin__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__("./StatsPlugin");
100
- /* ESM import */var _StatsPlugin__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_StatsPlugin__WEBPACK_IMPORTED_MODULE_0__);
101
- /* ESM import */var _ManifestManager__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__("./ManifestManager");
102
- /* ESM import */var _ManifestManager__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_ManifestManager__WEBPACK_IMPORTED_MODULE_1__);
103
- /* ESM import */var _StatsManager__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__("./StatsManager");
104
- /* ESM import */var _StatsManager__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_StatsManager__WEBPACK_IMPORTED_MODULE_2__);
105
- /* ESM import */var _types__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__("./types");
106
- /* ESM import */var _types__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_types__WEBPACK_IMPORTED_MODULE_3__);
95
+ /* import */ var _StatsPlugin__rspack_import_0 = __webpack_require__("./StatsPlugin");
96
+ /* import */ var _StatsPlugin__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(_StatsPlugin__rspack_import_0);
97
+ /* import */ var _ManifestManager__rspack_import_1 = __webpack_require__("./ManifestManager");
98
+ /* import */ var _ManifestManager__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(_ManifestManager__rspack_import_1);
99
+ /* import */ var _StatsManager__rspack_import_2 = __webpack_require__("./StatsManager");
100
+ /* import */ var _StatsManager__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(_StatsManager__rspack_import_2);
101
+ /* import */ var _types__rspack_import_3 = __webpack_require__("./types");
102
+ /* import */ var _types__rspack_import_3_default = /*#__PURE__*/__webpack_require__.n(_types__rspack_import_3);
103
+
104
+ /* reexport */ var __rspack_reexport = {};
105
+ /* reexport */ for( const __rspack_import_key in _types__rspack_import_3) if(["StatsPlugin","ManifestManager","default","StatsManager"].indexOf(__rspack_import_key) < 0) __rspack_reexport[__rspack_import_key] =() => _types__rspack_import_3[__rspack_import_key]
106
+ /* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
107
107
 
108
- /* ESM reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
109
- /* ESM reexport (unknown) */ for( var __WEBPACK_IMPORT_KEY__ in _types__WEBPACK_IMPORTED_MODULE_3__) if(["StatsManager","default","ManifestManager","StatsPlugin"].indexOf(__WEBPACK_IMPORT_KEY__) < 0) __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] =function(key) { return _types__WEBPACK_IMPORTED_MODULE_3__[key]; }.bind(0, __WEBPACK_IMPORT_KEY__)
110
- /* ESM reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
111
108
 
112
109
 
113
110
 
114
111
 
112
+ __webpack_require__.d(__webpack_exports__, {
113
+ ManifestManager: () => (/* reexport safe */ _ManifestManager__rspack_import_1.ManifestManager),
114
+ StatsManager: () => (/* reexport safe */ _StatsManager__rspack_import_2.StatsManager),
115
+ StatsPlugin: () => (/* reexport safe */ _StatsPlugin__rspack_import_0.StatsPlugin)
116
+ });
115
117
 
116
118
  })();
117
119
 
118
120
  exports.ManifestManager = __webpack_exports__.ManifestManager;
119
121
  exports.StatsManager = __webpack_exports__.StatsManager;
120
122
  exports.StatsPlugin = __webpack_exports__.StatsPlugin;
121
- for(var __webpack_i__ in __webpack_exports__) {
122
- if(["ManifestManager","StatsManager","StatsPlugin"].indexOf(__webpack_i__) === -1) {
123
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
123
+ for(var __rspack_i in __webpack_exports__) {
124
+ if(["ManifestManager","StatsManager","StatsPlugin"].indexOf(__rspack_i) === -1) {
125
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
124
126
  }
125
127
  }
126
128
  Object.defineProperty(exports, '__esModule', { value: true });
package/dist/index.mjs CHANGED
@@ -1,18 +1,12 @@
1
- import { StatsPlugin } from "./StatsPlugin.mjs";
2
- import { ManifestManager } from "./ManifestManager.mjs";
3
- import { StatsManager } from "./StatsManager.mjs";
4
1
  export * from "./types.mjs";
5
2
 
6
- ;// CONCATENATED MODULE: external "./StatsPlugin.mjs"
7
3
 
8
- ;// CONCATENATED MODULE: external "./ManifestManager.mjs"
9
4
 
10
- ;// CONCATENATED MODULE: external "./StatsManager.mjs"
11
5
 
12
- ;// CONCATENATED MODULE: ./src/index.ts
13
6
 
14
7
 
15
8
 
16
9
 
17
-
18
- export { ManifestManager, StatsManager, StatsPlugin };
10
+ export { StatsPlugin } from "./StatsPlugin.mjs";
11
+ export { ManifestManager } from "./ManifestManager.mjs";
12
+ export { StatsManager } from "./StatsManager.mjs";
package/dist/logger.js CHANGED
@@ -9,15 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/define_property_getters
14
13
  (() => {
15
- __webpack_require__.d = (exports, definition) => {
16
- for(var key in definition) {
17
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
18
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
19
- }
20
- }
14
+ __webpack_require__.d = (exports, getters, values) => {
15
+ var define = (defs, kind) => {
16
+ for(var key in defs) {
17
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
18
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
19
+ }
20
+ }
21
+ };
22
+ define(getters, "get");
23
+ define(values, "value");
21
24
  };
22
25
  })();
23
26
  // webpack/runtime/has_own_property
@@ -34,7 +37,6 @@ __webpack_require__.r = (exports) => {
34
37
  Object.defineProperty(exports, '__esModule', { value: true });
35
38
  };
36
39
  })();
37
- /************************************************************************/
38
40
  var __webpack_exports__ = {};
39
41
  // ESM COMPAT FLAG
40
42
  __webpack_require__.r(__webpack_exports__);
@@ -56,12 +58,12 @@ const external_constants_js_namespaceObject = require("./constants.js");
56
58
 
57
59
  const createBundlerLogger = typeof sdk_namespaceObject.createInfrastructureLogger === 'function' ? sdk_namespaceObject.createInfrastructureLogger : sdk_namespaceObject.createLogger;
58
60
  const logger = createBundlerLogger((0,external_node_util_namespaceObject.styleText)('cyan', `[ ${external_constants_js_namespaceObject.PLUGIN_IDENTIFIER} ]`));
59
- /* ESM default export */ const src_logger = (logger);
61
+ /* export default */ const src_logger = (logger);
60
62
 
61
63
  exports["default"] = __webpack_exports__["default"];
62
- for(var __webpack_i__ in __webpack_exports__) {
63
- if(["default"].indexOf(__webpack_i__) === -1) {
64
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
64
+ for(var __rspack_i in __webpack_exports__) {
65
+ if(["default"].indexOf(__rspack_i) === -1) {
66
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
65
67
  }
66
68
  }
67
69
  Object.defineProperty(exports, '__esModule', { value: true });
package/dist/logger.mjs CHANGED
@@ -2,18 +2,14 @@ import { styleText } from "node:util";
2
2
  import { createInfrastructureLogger, createLogger } from "@module-federation/sdk";
3
3
  import { PLUGIN_IDENTIFIER } from "./constants.mjs";
4
4
 
5
- ;// CONCATENATED MODULE: external "node:util"
6
5
 
7
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
8
6
 
9
- ;// CONCATENATED MODULE: external "./constants.mjs"
10
7
 
11
- ;// CONCATENATED MODULE: ./src/logger.ts
12
8
 
13
9
 
14
10
 
15
11
  const createBundlerLogger = typeof createInfrastructureLogger === 'function' ? createInfrastructureLogger : createLogger;
16
12
  const logger = createBundlerLogger(styleText('cyan', `[ ${PLUGIN_IDENTIFIER} ]`));
17
- /* ESM default export */ const src_logger = (logger);
13
+ /* export default */ const src_logger = (logger);
18
14
 
19
- export { src_logger as default };
15
+ export default src_logger;
package/dist/types.js CHANGED
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/make_namespace_object
14
13
  (() => {
15
14
  // define __esModule on exports
@@ -20,12 +19,11 @@ __webpack_require__.r = (exports) => {
20
19
  Object.defineProperty(exports, '__esModule', { value: true });
21
20
  };
22
21
  })();
23
- /************************************************************************/
24
22
  var __webpack_exports__ = {};
25
23
  __webpack_require__.r(__webpack_exports__);
26
24
 
27
25
 
28
- for(var __webpack_i__ in __webpack_exports__) {
29
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
26
+ for(var __rspack_i in __webpack_exports__) {
27
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
30
28
  }
31
29
  Object.defineProperty(exports, '__esModule', { value: true });
package/dist/types.mjs CHANGED
@@ -1,4 +1,3 @@
1
1
 
2
- ;// CONCATENATED MODULE: ./src/types.ts
3
-
4
2
 
3
+ export {};
package/dist/utils.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Chunk, Compilation } from 'webpack';
2
- import type { StatsCompilation, StatsModule } from '../../../webpack/lib/stats/DefaultStatsFactoryPlugin.d';
2
+ import type { StatsCompilation, StatsModule } from 'webpack/lib/stats/DefaultStatsFactoryPlugin';
3
3
  import { StatsAssets, moduleFederationPlugin, MetaDataTypes } from '@module-federation/sdk';
4
4
  export declare function getAssetsByChunkIDs(compilation: Compilation, chunkIDMap: Record<string, Set<string | number>>): Record<string, {
5
5
  js: string[];
package/dist/utils.js CHANGED
@@ -9,7 +9,6 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
12
  // webpack/runtime/compat_get_default_export
14
13
  (() => {
15
14
  // getDefaultExport function for compatibility with non-ESM modules
@@ -24,12 +23,16 @@ __webpack_require__.n = (module) => {
24
23
  })();
25
24
  // webpack/runtime/define_property_getters
26
25
  (() => {
27
- __webpack_require__.d = (exports, definition) => {
28
- for(var key in definition) {
29
- if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
30
- Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
31
- }
32
- }
26
+ __webpack_require__.d = (exports, getters, values) => {
27
+ var define = (defs, kind) => {
28
+ for(var key in defs) {
29
+ if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
30
+ Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
31
+ }
32
+ }
33
+ };
34
+ define(getters, "get");
35
+ define(values, "value");
33
36
  };
34
37
  })();
35
38
  // webpack/runtime/has_own_property
@@ -46,22 +49,21 @@ __webpack_require__.r = (exports) => {
46
49
  Object.defineProperty(exports, '__esModule', { value: true });
47
50
  };
48
51
  })();
49
- /************************************************************************/
50
52
  var __webpack_exports__ = {};
51
53
  // ESM COMPAT FLAG
52
54
  __webpack_require__.r(__webpack_exports__);
53
55
 
54
56
  // EXPORTS
55
57
  __webpack_require__.d(__webpack_exports__, {
58
+ assert: () => (/* binding */ assert),
59
+ error: () => (/* binding */ error),
56
60
  findChunk: () => (/* binding */ findChunk),
57
- getSharedModules: () => (/* binding */ getSharedModules),
58
- getTypesMetaInfo: () => (/* binding */ getTypesMetaInfo),
59
- isDev: () => (/* binding */ isDev),
60
- getFileNameWithOutExt: () => (/* binding */ getFileNameWithOutExt),
61
61
  getAssetsByChunk: () => (/* binding */ getAssetsByChunk),
62
- error: () => (/* binding */ error),
63
62
  getAssetsByChunkIDs: () => (/* binding */ getAssetsByChunkIDs),
64
- assert: () => (/* binding */ assert)
63
+ getFileNameWithOutExt: () => (/* binding */ getFileNameWithOutExt),
64
+ getSharedModules: () => (/* binding */ getSharedModules),
65
+ getTypesMetaInfo: () => (/* binding */ getTypesMetaInfo),
66
+ isDev: () => (/* binding */ isDev)
65
67
  });
66
68
 
67
69
  ;// CONCATENATED MODULE: external "path"
@@ -141,10 +143,9 @@ function findChunk(id, chunks) {
141
143
  }
142
144
  }
143
145
  function getSharedModules(stats, sharedModules) {
144
- var _stats_modules;
145
146
  // 获取入口文件就是实际内容的 module
146
147
  const entryContentModuleNames = [];
147
- let effectiveSharedModules = ((_stats_modules = stats.modules) === null || _stats_modules === void 0 ? void 0 : _stats_modules.reduce((sum, module)=>{
148
+ let effectiveSharedModules = stats.modules?.reduce((sum, module)=>{
148
149
  for (const sharedModule of sharedModules){
149
150
  if (sharedModule.name === module.issuerName) {
150
151
  entryContentModuleNames.push(sharedModule.name);
@@ -156,7 +157,7 @@ function getSharedModules(stats, sharedModules) {
156
157
  }
157
158
  }
158
159
  return sum;
159
- }, [])) || [];
160
+ }, []) || [];
160
161
  // 获取入口文件仅作为 Re Export 的 module
161
162
  const entryReExportModules = sharedModules.filter((sharedModule)=>!entryContentModuleNames.includes(sharedModule.name));
162
163
  if (entryReExportModules.length) {
@@ -288,9 +289,9 @@ exports.getFileNameWithOutExt = __webpack_exports__.getFileNameWithOutExt;
288
289
  exports.getSharedModules = __webpack_exports__.getSharedModules;
289
290
  exports.getTypesMetaInfo = __webpack_exports__.getTypesMetaInfo;
290
291
  exports.isDev = __webpack_exports__.isDev;
291
- for(var __webpack_i__ in __webpack_exports__) {
292
- if(["assert","error","findChunk","getAssetsByChunk","getAssetsByChunkIDs","getFileNameWithOutExt","getSharedModules","getTypesMetaInfo","isDev"].indexOf(__webpack_i__) === -1) {
293
- exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
292
+ for(var __rspack_i in __webpack_exports__) {
293
+ if(["assert","error","findChunk","getAssetsByChunk","getAssetsByChunkIDs","getFileNameWithOutExt","getSharedModules","getTypesMetaInfo","isDev"].indexOf(__rspack_i) === -1) {
294
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
294
295
  }
295
296
  }
296
297
  Object.defineProperty(exports, '__esModule', { value: true });
package/dist/utils.mjs CHANGED
@@ -4,17 +4,11 @@ import { isTSProject, retrieveTypesAssetsInfo } from "@module-federation/dts-plu
4
4
  import { HOT_UPDATE_SUFFIX, PLUGIN_IDENTIFIER } from "./constants.mjs";
5
5
  import logger from "./logger.mjs";
6
6
 
7
- ;// CONCATENATED MODULE: external "path"
8
7
 
9
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
10
8
 
11
- ;// CONCATENATED MODULE: external "@module-federation/dts-plugin/core"
12
9
 
13
- ;// CONCATENATED MODULE: external "./constants.mjs"
14
10
 
15
- ;// CONCATENATED MODULE: external "./logger.mjs"
16
11
 
17
- ;// CONCATENATED MODULE: ./src/utils.ts
18
12
 
19
13
 
20
14
 
@@ -79,10 +73,9 @@ function findChunk(id, chunks) {
79
73
  }
80
74
  }
81
75
  function getSharedModules(stats, sharedModules) {
82
- var _stats_modules;
83
76
  // 获取入口文件就是实际内容的 module
84
77
  const entryContentModuleNames = [];
85
- let effectiveSharedModules = ((_stats_modules = stats.modules) === null || _stats_modules === void 0 ? void 0 : _stats_modules.reduce((sum, module)=>{
78
+ let effectiveSharedModules = stats.modules?.reduce((sum, module)=>{
86
79
  for (const sharedModule of sharedModules){
87
80
  if (sharedModule.name === module.issuerName) {
88
81
  entryContentModuleNames.push(sharedModule.name);
@@ -94,7 +87,7 @@ function getSharedModules(stats, sharedModules) {
94
87
  }
95
88
  }
96
89
  return sum;
97
- }, [])) || [];
90
+ }, []) || [];
98
91
  // 获取入口文件仅作为 Re Export 的 module
99
92
  const entryReExportModules = sharedModules.filter((sharedModule)=>!entryContentModuleNames.includes(sharedModule.name));
100
93
  if (entryReExportModules.length) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/manifest",
3
- "version": "2.6.0",
3
+ "version": "2.8.0",
4
4
  "license": "MIT",
5
5
  "description": "Provide manifest/stats for webpack/rspack MF project .",
6
6
  "keywords": [
@@ -27,10 +27,9 @@
27
27
  "module": "./dist/index.mjs",
28
28
  "types": "./dist/index.d.ts",
29
29
  "dependencies": {
30
- "find-pkg": "2.0.0",
31
- "@module-federation/sdk": "2.6.0",
32
- "@module-federation/dts-plugin": "2.6.0",
33
- "@module-federation/managers": "2.6.0"
30
+ "@module-federation/sdk": "2.8.0",
31
+ "@module-federation/dts-plugin": "2.8.0",
32
+ "@module-federation/managers": "2.8.0"
34
33
  },
35
34
  "exports": {
36
35
  ".": {
@@ -52,6 +51,7 @@
52
51
  }
53
52
  },
54
53
  "devDependencies": {
54
+ "typescript": "7.0.2",
55
55
  "webpack": "^5.0.0"
56
56
  },
57
57
  "scripts": {