@depup/module-federation__manifest 2.3.0-depup.0 → 2.8.0-depup.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.
package/README.md CHANGED
@@ -13,16 +13,10 @@ npm install @depup/module-federation__manifest
13
13
 
14
14
  | Field | Value |
15
15
  |-------|-------|
16
- | Original | [@module-federation/manifest](https://www.npmjs.com/package/@module-federation/manifest) @ 2.3.0 |
17
- | Processed | 2026-03-26 |
16
+ | Original | [@module-federation/manifest](https://www.npmjs.com/package/@module-federation/manifest) @ 2.8.0 |
17
+ | Processed | 2026-07-21 |
18
18
  | Smoke test | passed |
19
- | Deps updated | 1 |
20
-
21
- ## Dependency Changes
22
-
23
- | Dependency | From | To |
24
- |------------|------|-----|
25
- | chalk | 3.0.0 | ^5.6.2 |
19
+ | Deps updated | 0 |
26
20
 
27
21
  ---
28
22
 
package/changes.json CHANGED
@@ -1,10 +1,5 @@
1
1
  {
2
- "bumped": {
3
- "chalk": {
4
- "from": "3.0.0",
5
- "to": "^5.6.2"
6
- }
7
- },
8
- "timestamp": "2026-03-26T12:25:58.899Z",
9
- "totalUpdated": 1
2
+ "bumped": {},
3
+ "timestamp": "2026-07-21T16:05:36.265Z",
4
+ "totalUpdated": 0
10
5
  }
@@ -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__);
@@ -56,9 +58,8 @@ __webpack_require__.d(__webpack_exports__, {
56
58
  ManifestManager: () => (/* binding */ ManifestManager)
57
59
  });
58
60
 
59
- ;// CONCATENATED MODULE: external "chalk"
60
- const external_chalk_namespaceObject = require("chalk");
61
- var external_chalk_default = /*#__PURE__*/__webpack_require__.n(external_chalk_namespaceObject);
61
+ ;// CONCATENATED MODULE: external "node:util"
62
+ const external_node_util_namespaceObject = require("node:util");
62
63
  ;// CONCATENATED MODULE: external "@module-federation/sdk"
63
64
  const sdk_namespaceObject = require("@module-federation/sdk");
64
65
  ;// CONCATENATED MODULE: external "./utils.js"
@@ -142,7 +143,7 @@ class ManifestManager {
142
143
  return sum;
143
144
  }, []);
144
145
  if ((0,external_utils_js_namespaceObject.isDev)() && (process.env['MF_SSR_PRJ'] ? compiler.options.target !== 'async-node' : true)) {
145
- external_logger_js_default().info(`Manifest Link: ${external_chalk_default().cyan(`${publicPath === 'auto' ? '{auto}/' : publicPath}${this.fileName}`)} `);
146
+ external_logger_js_default().info(`Manifest Link: ${(0,external_node_util_namespaceObject.styleText)('cyan', `${publicPath === 'auto' ? '{auto}/' : publicPath}${this.fileName}`)} `);
146
147
  }
147
148
  return manifest;
148
149
  }
@@ -153,9 +154,9 @@ class ManifestManager {
153
154
 
154
155
 
155
156
  exports.ManifestManager = __webpack_exports__.ManifestManager;
156
- for(var __webpack_i__ in __webpack_exports__) {
157
- if(["ManifestManager"].indexOf(__webpack_i__) === -1) {
158
- 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];
159
160
  }
160
161
  }
161
162
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,17 +1,12 @@
1
- import chalk from "chalk";
1
+ import { styleText } from "node:util";
2
2
  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 "chalk"
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
 
@@ -87,7 +82,7 @@ class ManifestManager {
87
82
  return sum;
88
83
  }, []);
89
84
  if (isDev() && (process.env['MF_SSR_PRJ'] ? compiler.options.target !== 'async-node' : true)) {
90
- logger.info(`Manifest Link: ${chalk.cyan(`${publicPath === 'auto' ? '{auto}/' : publicPath}${this.fileName}`)} `);
85
+ logger.info(`Manifest Link: ${styleText('cyan', `${publicPath === 'auto' ? '{auto}/' : publicPath}${this.fileName}`)} `);
91
86
  }
92
87
  return manifest;
93
88
  }
@@ -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__);
@@ -56,12 +58,6 @@ __webpack_require__.d(__webpack_exports__, {
56
58
  StatsManager: () => (/* binding */ StatsManager)
57
59
  });
58
60
 
59
- ;// CONCATENATED MODULE: external "fs"
60
- const external_fs_namespaceObject = require("fs");
61
- var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_namespaceObject);
62
- ;// CONCATENATED MODULE: external "path"
63
- const external_path_namespaceObject = require("path");
64
- var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
65
61
  ;// CONCATENATED MODULE: external "@module-federation/sdk"
66
62
  const sdk_namespaceObject = require("@module-federation/sdk");
67
63
  ;// CONCATENATED MODULE: external "./utils.js"
@@ -82,8 +78,6 @@ const external_ModuleHandler_js_namespaceObject = require("./ModuleHandler.js");
82
78
 
83
79
 
84
80
 
85
-
86
-
87
81
  class StatsManager {
88
82
  getBuildInfo(context, target) {
89
83
  const rootPath = context || process.cwd();
@@ -117,7 +111,6 @@ class StatsManager {
117
111
  return metaData;
118
112
  }
119
113
  _getMetaData(compiler, compilation, extraOptions) {
120
- var _this__options_library, _this__options;
121
114
  const { context } = compiler.options;
122
115
  const { _options: { name } } = this;
123
116
  const buildInfo = this.getBuildInfo(context, compilation.options.target || '');
@@ -147,23 +140,13 @@ class StatsManager {
147
140
  remoteEntry: {
148
141
  name: getRemoteEntryName(),
149
142
  path: '',
150
- // same as the types supported by runtime, currently only global/var/script is supported
151
- 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'
152
145
  },
153
146
  types: (0,external_utils_js_namespaceObject.getTypesMetaInfo)(this._options, compiler.context),
154
147
  globalName: globalName,
155
148
  pluginVersion: this._pluginVersion
156
149
  };
157
- let prefetchInterface = false;
158
- const prefetchFilePath = external_path_default().resolve(compiler.options.context || process.cwd(), `node_modules/.mf/${(0,sdk_namespaceObject.encodeName)(name)}/${sdk_namespaceObject.MFPrefetchCommon.fileName}`);
159
- const existPrefetch = external_fs_default().existsSync(prefetchFilePath);
160
- if (existPrefetch) {
161
- const content = external_fs_default().readFileSync(prefetchFilePath).toString();
162
- if (content) {
163
- prefetchInterface = true;
164
- }
165
- }
166
- metaData.prefetchInterface = prefetchInterface;
167
150
  return this.setMetaDataPublicPath(metaData, compiler);
168
151
  }
169
152
  _getFilteredModules(stats) {
@@ -505,6 +488,13 @@ class StatsManager {
505
488
  }
506
489
  updateStats(stats, compiler) {
507
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
+ }
508
498
  if (!metaData.types) {
509
499
  metaData.types = (0,external_utils_js_namespaceObject.getTypesMetaInfo)(this._options, compiler.context);
510
500
  }
@@ -512,8 +502,6 @@ class StatsManager {
512
502
  metaData.pluginVersion = this._pluginVersion;
513
503
  }
514
504
  this.setMetaDataPublicPath(metaData, compiler);
515
- // rspack not support legacy prefetch, and this field should be removed in the future
516
- metaData.prefetchInterface = false;
517
505
  return stats;
518
506
  }
519
507
  async generateStats(compiler, compilation) {
@@ -547,9 +535,9 @@ class StatsManager {
547
535
 
548
536
 
549
537
  exports.StatsManager = __webpack_exports__.StatsManager;
550
- for(var __webpack_i__ in __webpack_exports__) {
551
- if(["StatsManager"].indexOf(__webpack_i__) === -1) {
552
- 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];
553
541
  }
554
542
  }
555
543
  Object.defineProperty(exports, '__esModule', { value: true });
@@ -1,37 +1,22 @@
1
- import fs from "fs";
2
- import path from "path";
3
- import { MFPrefetchCommon, composeKeyWithSeparator, encodeName, getManifestFileName } from "@module-federation/sdk";
1
+ import { composeKeyWithSeparator, getManifestFileName } from "@module-federation/sdk";
4
2
  import { assert, findChunk, getAssetsByChunk, getAssetsByChunkIDs, getFileNameWithOutExt, getSharedModules, getTypesMetaInfo } from "./utils.mjs";
5
3
  import logger from "./logger.mjs";
6
4
  import { ContainerManager, PKGJsonManager, RemoteManager, SharedManager, UNKNOWN_MODULE_NAME, utils } from "@module-federation/managers";
7
5
  import { HOT_UPDATE_SUFFIX } from "./constants.mjs";
8
6
  import { ModuleHandler, getExposeItem, getExposeName, getShareItem } from "./ModuleHandler.mjs";
9
7
 
10
- ;// CONCATENATED MODULE: external "fs"
11
8
 
12
- ;// CONCATENATED MODULE: external "path"
13
9
 
14
- ;// CONCATENATED MODULE: external "@module-federation/sdk"
15
10
 
16
- ;// CONCATENATED MODULE: external "./utils.mjs"
17
11
 
18
- ;// CONCATENATED MODULE: external "./logger.mjs"
19
12
 
20
- ;// CONCATENATED MODULE: external "@module-federation/managers"
21
13
 
22
- ;// CONCATENATED MODULE: external "./constants.mjs"
23
-
24
- ;// CONCATENATED MODULE: external "./ModuleHandler.mjs"
25
-
26
- ;// CONCATENATED MODULE: ./src/StatsManager.ts
27
14
  /* eslint-disable max-lines-per-function */ /* eslint-disable @typescript-eslint/member-ordering */ /* eslint-disable max-depth */
28
15
 
29
16
 
30
17
 
31
18
 
32
19
 
33
-
34
-
35
20
  class StatsManager {
36
21
  getBuildInfo(context, target) {
37
22
  const rootPath = context || process.cwd();
@@ -65,7 +50,6 @@ class StatsManager {
65
50
  return metaData;
66
51
  }
67
52
  _getMetaData(compiler, compilation, extraOptions) {
68
- var _this__options_library, _this__options;
69
53
  const { context } = compiler.options;
70
54
  const { _options: { name } } = this;
71
55
  const buildInfo = this.getBuildInfo(context, compilation.options.target || '');
@@ -95,23 +79,13 @@ class StatsManager {
95
79
  remoteEntry: {
96
80
  name: getRemoteEntryName(),
97
81
  path: '',
98
- // same as the types supported by runtime, currently only global/var/script is supported
99
- 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'
100
84
  },
101
85
  types: getTypesMetaInfo(this._options, compiler.context),
102
86
  globalName: globalName,
103
87
  pluginVersion: this._pluginVersion
104
88
  };
105
- let prefetchInterface = false;
106
- const prefetchFilePath = path.resolve(compiler.options.context || process.cwd(), `node_modules/.mf/${encodeName(name)}/${MFPrefetchCommon.fileName}`);
107
- const existPrefetch = fs.existsSync(prefetchFilePath);
108
- if (existPrefetch) {
109
- const content = fs.readFileSync(prefetchFilePath).toString();
110
- if (content) {
111
- prefetchInterface = true;
112
- }
113
- }
114
- metaData.prefetchInterface = prefetchInterface;
115
89
  return this.setMetaDataPublicPath(metaData, compiler);
116
90
  }
117
91
  _getFilteredModules(stats) {
@@ -453,6 +427,13 @@ class StatsManager {
453
427
  }
454
428
  updateStats(stats, compiler) {
455
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
+ }
456
437
  if (!metaData.types) {
457
438
  metaData.types = getTypesMetaInfo(this._options, compiler.context);
458
439
  }
@@ -460,8 +441,6 @@ class StatsManager {
460
441
  metaData.pluginVersion = this._pluginVersion;
461
442
  }
462
443
  this.setMetaDataPublicPath(metaData, compiler);
463
- // rspack not support legacy prefetch, and this field should be removed in the future
464
- metaData.prefetchInterface = false;
465
444
  return stats;
466
445
  }
467
446
  async generateStats(compiler, compilation) {
@@ -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,27 +9,18 @@ const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
9
9
  // The require scope
10
10
  var __webpack_require__ = {};
11
11
 
12
- /************************************************************************/
13
- // webpack/runtime/compat_get_default_export
14
- (() => {
15
- // getDefaultExport function for compatibility with non-ESM modules
16
- __webpack_require__.n = (module) => {
17
- var getter = module && module.__esModule ?
18
- () => (module['default']) :
19
- () => (module);
20
- __webpack_require__.d(getter, { a: getter });
21
- return getter;
22
- };
23
-
24
- })();
25
12
  // webpack/runtime/define_property_getters
26
13
  (() => {
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
- }
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");
33
24
  };
34
25
  })();
35
26
  // webpack/runtime/has_own_property
@@ -46,7 +37,6 @@ __webpack_require__.r = (exports) => {
46
37
  Object.defineProperty(exports, '__esModule', { value: true });
47
38
  };
48
39
  })();
49
- /************************************************************************/
50
40
  var __webpack_exports__ = {};
51
41
  // ESM COMPAT FLAG
52
42
  __webpack_require__.r(__webpack_exports__);
@@ -56,9 +46,8 @@ __webpack_require__.d(__webpack_exports__, {
56
46
  "default": () => (/* binding */ src_logger)
57
47
  });
58
48
 
59
- ;// CONCATENATED MODULE: external "chalk"
60
- const external_chalk_namespaceObject = require("chalk");
61
- var external_chalk_default = /*#__PURE__*/__webpack_require__.n(external_chalk_namespaceObject);
49
+ ;// CONCATENATED MODULE: external "node:util"
50
+ const external_node_util_namespaceObject = require("node:util");
62
51
  ;// CONCATENATED MODULE: external "@module-federation/sdk"
63
52
  const sdk_namespaceObject = require("@module-federation/sdk");
64
53
  ;// CONCATENATED MODULE: external "./constants.js"
@@ -68,13 +57,13 @@ const external_constants_js_namespaceObject = require("./constants.js");
68
57
 
69
58
 
70
59
  const createBundlerLogger = typeof sdk_namespaceObject.createInfrastructureLogger === 'function' ? sdk_namespaceObject.createInfrastructureLogger : sdk_namespaceObject.createLogger;
71
- const logger = createBundlerLogger(external_chalk_default().cyan(`[ ${external_constants_js_namespaceObject.PLUGIN_IDENTIFIER} ]`));
72
- /* ESM default export */ const src_logger = (logger);
60
+ const logger = createBundlerLogger((0,external_node_util_namespaceObject.styleText)('cyan', `[ ${external_constants_js_namespaceObject.PLUGIN_IDENTIFIER} ]`));
61
+ /* export default */ const src_logger = (logger);
73
62
 
74
63
  exports["default"] = __webpack_exports__["default"];
75
- for(var __webpack_i__ in __webpack_exports__) {
76
- if(["default"].indexOf(__webpack_i__) === -1) {
77
- 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];
78
67
  }
79
68
  }
80
69
  Object.defineProperty(exports, '__esModule', { value: true });
package/dist/logger.mjs CHANGED
@@ -1,19 +1,15 @@
1
- import chalk from "chalk";
1
+ 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 "chalk"
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
- const logger = createBundlerLogger(chalk.cyan(`[ ${PLUGIN_IDENTIFIER} ]`));
17
- /* ESM default export */ const src_logger = (logger);
12
+ const logger = createBundlerLogger(styleText('cyan', `[ ${PLUGIN_IDENTIFIER} ]`));
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": "@depup/module-federation__manifest",
3
- "version": "2.3.0-depup.0",
3
+ "version": "2.8.0-depup.0",
4
4
  "license": "MIT",
5
5
  "description": "Provide manifest/stats for webpack/rspack MF project . (with updated dependencies)",
6
6
  "keywords": [
@@ -31,11 +31,9 @@
31
31
  "module": "./dist/index.mjs",
32
32
  "types": "./dist/index.d.ts",
33
33
  "dependencies": {
34
- "find-pkg": "2.0.0",
35
- "chalk": "^5.6.2",
36
- "@module-federation/dts-plugin": "2.3.0",
37
- "@module-federation/sdk": "2.3.0",
38
- "@module-federation/managers": "2.3.0"
34
+ "@module-federation/sdk": "2.8.0",
35
+ "@module-federation/dts-plugin": "2.8.0",
36
+ "@module-federation/managers": "2.8.0"
39
37
  },
40
38
  "exports": {
41
39
  ".": {
@@ -57,6 +55,7 @@
57
55
  }
58
56
  },
59
57
  "devDependencies": {
58
+ "typescript": "7.0.2",
60
59
  "webpack": "^5.0.0"
61
60
  },
62
61
  "scripts": {
@@ -67,16 +66,11 @@
67
66
  "pre-release": "pnpm run test && pnpm run build"
68
67
  },
69
68
  "depup": {
70
- "changes": {
71
- "chalk": {
72
- "from": "3.0.0",
73
- "to": "^5.6.2"
74
- }
75
- },
76
- "depsUpdated": 1,
69
+ "changes": {},
70
+ "depsUpdated": 0,
77
71
  "originalPackage": "@module-federation/manifest",
78
- "originalVersion": "2.3.0",
79
- "processedAt": "2026-03-26T12:26:03.830Z",
72
+ "originalVersion": "2.8.0",
73
+ "processedAt": "2026-07-21T16:05:42.234Z",
80
74
  "smokeTest": "passed"
81
75
  }
82
76
  }