@module-federation/manifest 0.0.0-next-20240515125630 → 0.0.0-next-20240516035452
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/dist/index.cjs.js +26 -26
- package/dist/index.esm.js +26 -26
- package/package.json +4 -4
package/dist/index.cjs.js
CHANGED
|
@@ -668,45 +668,42 @@ var ManifestManager = /*#__PURE__*/ function() {
|
|
|
668
668
|
compilation = options.compilation, publicPath = options.publicPath, stats = options.stats, compiler = options.compiler, bundler = options.bundler, additionalData = options.additionalData;
|
|
669
669
|
disableEmit = extraOptions.disableEmit;
|
|
670
670
|
manifest = _object_spread$2({}, stats);
|
|
671
|
-
manifest.exposes =
|
|
672
|
-
var statsExpose = manifest.exposes[cur];
|
|
671
|
+
manifest.exposes = stats.exposes.reduce(function(sum, cur) {
|
|
673
672
|
var expose = {
|
|
674
|
-
id:
|
|
675
|
-
name:
|
|
676
|
-
assets:
|
|
677
|
-
path:
|
|
673
|
+
id: cur.id,
|
|
674
|
+
name: cur.name,
|
|
675
|
+
assets: cur.assets,
|
|
676
|
+
path: cur.path
|
|
678
677
|
};
|
|
679
678
|
sum.push(expose);
|
|
680
679
|
return sum;
|
|
681
680
|
}, []);
|
|
682
|
-
manifest.shared =
|
|
683
|
-
var statsShared = manifest.shared[cur];
|
|
681
|
+
manifest.shared = stats.shared.reduce(function(sum, cur) {
|
|
684
682
|
var shared = {
|
|
685
|
-
id:
|
|
686
|
-
name:
|
|
687
|
-
version:
|
|
688
|
-
singleton:
|
|
689
|
-
requiredVersion:
|
|
690
|
-
hash:
|
|
691
|
-
assets:
|
|
683
|
+
id: cur.id,
|
|
684
|
+
name: cur.name,
|
|
685
|
+
version: cur.version,
|
|
686
|
+
singleton: cur.singleton,
|
|
687
|
+
requiredVersion: cur.requiredVersion,
|
|
688
|
+
hash: cur.hash,
|
|
689
|
+
assets: cur.assets
|
|
692
690
|
};
|
|
693
691
|
sum.push(shared);
|
|
694
692
|
return sum;
|
|
695
693
|
}, []);
|
|
696
|
-
manifest.remotes =
|
|
697
|
-
var statsRemote = manifest.remotes[cur];
|
|
694
|
+
manifest.remotes = stats.remotes.reduce(function(sum, cur) {
|
|
698
695
|
// @ts-ignore version/entry will be added as follow
|
|
699
696
|
var remote = {
|
|
700
|
-
federationContainerName:
|
|
701
|
-
moduleName:
|
|
702
|
-
alias:
|
|
697
|
+
federationContainerName: cur.federationContainerName,
|
|
698
|
+
moduleName: cur.moduleName,
|
|
699
|
+
alias: cur.alias
|
|
703
700
|
};
|
|
704
|
-
if ('entry' in
|
|
701
|
+
if ('entry' in cur) {
|
|
705
702
|
// @ts-ignore
|
|
706
|
-
remote.entry =
|
|
707
|
-
} else if ('version' in
|
|
703
|
+
remote.entry = cur.entry;
|
|
704
|
+
} else if ('version' in cur) {
|
|
708
705
|
// @ts-ignore
|
|
709
|
-
remote.entry =
|
|
706
|
+
remote.entry = cur.version;
|
|
710
707
|
}
|
|
711
708
|
sum.push(remote);
|
|
712
709
|
return sum;
|
|
@@ -1778,10 +1775,13 @@ var StatsManager = /*#__PURE__*/ function() {
|
|
|
1778
1775
|
]);
|
|
1779
1776
|
disableEmit = extraOptions.disableEmit;
|
|
1780
1777
|
existedStats = compilation.getAsset(_this.fileName);
|
|
1781
|
-
if (existedStats) {
|
|
1778
|
+
if (existedStats && !isDev()) {
|
|
1782
1779
|
return [
|
|
1783
1780
|
2,
|
|
1784
|
-
|
|
1781
|
+
{
|
|
1782
|
+
stats: JSON.parse(existedStats.source.source().toString()),
|
|
1783
|
+
filename: _this.fileName
|
|
1784
|
+
}
|
|
1785
1785
|
];
|
|
1786
1786
|
}
|
|
1787
1787
|
_this__options = _this._options, tmp = _this__options.manifest, manifestOptions = tmp === void 0 ? {} : tmp;
|
package/dist/index.esm.js
CHANGED
|
@@ -659,45 +659,42 @@ var ManifestManager = /*#__PURE__*/ function() {
|
|
|
659
659
|
compilation = options.compilation, publicPath = options.publicPath, stats = options.stats, compiler = options.compiler, bundler = options.bundler, additionalData = options.additionalData;
|
|
660
660
|
disableEmit = extraOptions.disableEmit;
|
|
661
661
|
manifest = _object_spread$2({}, stats);
|
|
662
|
-
manifest.exposes =
|
|
663
|
-
var statsExpose = manifest.exposes[cur];
|
|
662
|
+
manifest.exposes = stats.exposes.reduce(function(sum, cur) {
|
|
664
663
|
var expose = {
|
|
665
|
-
id:
|
|
666
|
-
name:
|
|
667
|
-
assets:
|
|
668
|
-
path:
|
|
664
|
+
id: cur.id,
|
|
665
|
+
name: cur.name,
|
|
666
|
+
assets: cur.assets,
|
|
667
|
+
path: cur.path
|
|
669
668
|
};
|
|
670
669
|
sum.push(expose);
|
|
671
670
|
return sum;
|
|
672
671
|
}, []);
|
|
673
|
-
manifest.shared =
|
|
674
|
-
var statsShared = manifest.shared[cur];
|
|
672
|
+
manifest.shared = stats.shared.reduce(function(sum, cur) {
|
|
675
673
|
var shared = {
|
|
676
|
-
id:
|
|
677
|
-
name:
|
|
678
|
-
version:
|
|
679
|
-
singleton:
|
|
680
|
-
requiredVersion:
|
|
681
|
-
hash:
|
|
682
|
-
assets:
|
|
674
|
+
id: cur.id,
|
|
675
|
+
name: cur.name,
|
|
676
|
+
version: cur.version,
|
|
677
|
+
singleton: cur.singleton,
|
|
678
|
+
requiredVersion: cur.requiredVersion,
|
|
679
|
+
hash: cur.hash,
|
|
680
|
+
assets: cur.assets
|
|
683
681
|
};
|
|
684
682
|
sum.push(shared);
|
|
685
683
|
return sum;
|
|
686
684
|
}, []);
|
|
687
|
-
manifest.remotes =
|
|
688
|
-
var statsRemote = manifest.remotes[cur];
|
|
685
|
+
manifest.remotes = stats.remotes.reduce(function(sum, cur) {
|
|
689
686
|
// @ts-ignore version/entry will be added as follow
|
|
690
687
|
var remote = {
|
|
691
|
-
federationContainerName:
|
|
692
|
-
moduleName:
|
|
693
|
-
alias:
|
|
688
|
+
federationContainerName: cur.federationContainerName,
|
|
689
|
+
moduleName: cur.moduleName,
|
|
690
|
+
alias: cur.alias
|
|
694
691
|
};
|
|
695
|
-
if ('entry' in
|
|
692
|
+
if ('entry' in cur) {
|
|
696
693
|
// @ts-ignore
|
|
697
|
-
remote.entry =
|
|
698
|
-
} else if ('version' in
|
|
694
|
+
remote.entry = cur.entry;
|
|
695
|
+
} else if ('version' in cur) {
|
|
699
696
|
// @ts-ignore
|
|
700
|
-
remote.entry =
|
|
697
|
+
remote.entry = cur.version;
|
|
701
698
|
}
|
|
702
699
|
sum.push(remote);
|
|
703
700
|
return sum;
|
|
@@ -1769,10 +1766,13 @@ var StatsManager = /*#__PURE__*/ function() {
|
|
|
1769
1766
|
]);
|
|
1770
1767
|
disableEmit = extraOptions.disableEmit;
|
|
1771
1768
|
existedStats = compilation.getAsset(_this.fileName);
|
|
1772
|
-
if (existedStats) {
|
|
1769
|
+
if (existedStats && !isDev()) {
|
|
1773
1770
|
return [
|
|
1774
1771
|
2,
|
|
1775
|
-
|
|
1772
|
+
{
|
|
1773
|
+
stats: JSON.parse(existedStats.source.source().toString()),
|
|
1774
|
+
filename: _this.fileName
|
|
1775
|
+
}
|
|
1776
1776
|
];
|
|
1777
1777
|
}
|
|
1778
1778
|
_this__options = _this._options, tmp = _this__options.manifest, manifestOptions = tmp === void 0 ? {} : tmp;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/manifest",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240516035452",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Provide manifest/stats for webpack/rspack MF project .",
|
|
6
6
|
"keywords": [
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"find-pkg": "2.0.0",
|
|
26
26
|
"chalk": "3.0.0",
|
|
27
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
28
|
-
"@module-federation/dts-plugin": "0.0.0-next-
|
|
29
|
-
"@module-federation/managers": "0.0.0-next-
|
|
27
|
+
"@module-federation/sdk": "0.0.0-next-20240516035452",
|
|
28
|
+
"@module-federation/dts-plugin": "0.0.0-next-20240516035452",
|
|
29
|
+
"@module-federation/managers": "0.0.0-next-20240516035452"
|
|
30
30
|
},
|
|
31
31
|
"exports": {
|
|
32
32
|
".": {
|