@module-federation/vite 1.2.5 → 1.2.6

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/lib/index.cjs CHANGED
@@ -699,9 +699,10 @@ function generateLocalSharedImportMap() {
699
699
  }).filter(function (x) {
700
700
  return x !== null;
701
701
  }).join(',') + "\n }\n const usedRemotes = [" + Object.keys(getUsedRemotesMap()).map(function (key) {
702
+ var _JSON$stringify;
702
703
  var remote = options.remotes[key];
703
704
  if (!remote) return null;
704
- return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n }\n ";
705
+ return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n shareScope: " + ((_JSON$stringify = JSON.stringify(remote.shareScope)) != null ? _JSON$stringify : 'default') + ",\n }\n ";
705
706
  }).filter(function (x) {
706
707
  return x !== null;
707
708
  }).join(',') + "\n ]\n export {\n usedShared,\n usedRemotes\n }\n ";
package/lib/index.esm.js CHANGED
@@ -675,9 +675,10 @@ function generateLocalSharedImportMap() {
675
675
  }).filter(function (x) {
676
676
  return x !== null;
677
677
  }).join(',') + "\n }\n const usedRemotes = [" + Object.keys(getUsedRemotesMap()).map(function (key) {
678
+ var _JSON$stringify;
678
679
  var remote = options.remotes[key];
679
680
  if (!remote) return null;
680
- return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n }\n ";
681
+ return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n shareScope: " + ((_JSON$stringify = JSON.stringify(remote.shareScope)) != null ? _JSON$stringify : 'default') + ",\n }\n ";
681
682
  }).filter(function (x) {
682
683
  return x !== null;
683
684
  }).join(',') + "\n ]\n export {\n usedShared,\n usedRemotes\n }\n ";
@@ -714,6 +714,7 @@ function generateLocalSharedImportMap() {
714
714
  }).filter(x => x !== null).join(',')}
715
715
  }
716
716
  const usedRemotes = [${Object.keys(getUsedRemotesMap()).map(key => {
717
+ var _JSON$stringify;
717
718
  const remote = options.remotes[key];
718
719
  if (!remote) return null;
719
720
  return `
@@ -722,6 +723,7 @@ function generateLocalSharedImportMap() {
722
723
  name: ${JSON.stringify(remote.name)},
723
724
  type: ${JSON.stringify(remote.type)},
724
725
  entry: ${JSON.stringify(remote.entry)},
726
+ shareScope: ${(_JSON$stringify = JSON.stringify(remote.shareScope)) != null ? _JSON$stringify : 'default'},
725
727
  }
726
728
  `;
727
729
  }).filter(x => x !== null).join(',')}
package/lib/index.umd.js CHANGED
@@ -697,9 +697,10 @@
697
697
  }).filter(function (x) {
698
698
  return x !== null;
699
699
  }).join(',') + "\n }\n const usedRemotes = [" + Object.keys(getUsedRemotesMap()).map(function (key) {
700
+ var _JSON$stringify;
700
701
  var remote = options.remotes[key];
701
702
  if (!remote) return null;
702
- return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n }\n ";
703
+ return "\n {\n entryGlobalName: " + JSON.stringify(remote.entryGlobalName) + ",\n name: " + JSON.stringify(remote.name) + ",\n type: " + JSON.stringify(remote.type) + ",\n entry: " + JSON.stringify(remote.entry) + ",\n shareScope: " + ((_JSON$stringify = JSON.stringify(remote.shareScope)) != null ? _JSON$stringify : 'default') + ",\n }\n ";
703
704
  }).filter(function (x) {
704
705
  return x !== null;
705
706
  }).join(',') + "\n ]\n export {\n usedShared,\n usedRemotes\n }\n ";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/vite",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Vite plugin for Module Federation",
5
5
  "type": "module",
6
6
  "source": "src/index.ts",