@module-federation/webpack-bundler-runtime 0.0.0-next-20240108071116 → 0.0.0-next-20240111135630

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 CHANGED
@@ -283,35 +283,17 @@ function _object_spread(target) {
283
283
  }
284
284
  return target;
285
285
  }
286
- function isLegacyHost(shareScope, remoteEntryInitOptions) {
287
- if (remoteEntryInitOptions && typeof remoteEntryInitOptions === "object" && remoteEntryInitOptions.hostId) {
288
- return false;
289
- }
290
- if ("version" in shareScope && typeof shareScope["version"] !== "object") {
291
- return true;
292
- }
293
- if ("region" in shareScope && typeof shareScope["region"] !== "object") {
294
- return true;
295
- }
296
- return false;
297
- }
298
286
  function initContainerEntry(options) {
299
287
  var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey, remoteEntryInitOptions = options.remoteEntryInitOptions;
300
288
  if (!webpackRequire.S) return;
301
289
  if (!webpackRequire.federation || !webpackRequire.federation.instance || !webpackRequire.federation.initOptions) return;
290
+ var federationInstance = webpackRequire.federation.instance;
302
291
  var name = shareScopeKey || "default";
303
- webpackRequire.federation.instance.initOptions(_object_spread({
292
+ federationInstance.initOptions(_object_spread({
304
293
  name: webpackRequire.federation.initOptions.name,
305
294
  remotes: []
306
295
  }, remoteEntryInitOptions));
307
- if (isLegacyHost(shareScope, remoteEntryInitOptions)) {
308
- var prevShareScope = globalThis.__FEDERATION__.__SHARE__["default"];
309
- if (prevShareScope) {
310
- webpackRequire.federation.instance.initShareScopeMap(name, prevShareScope);
311
- }
312
- } else {
313
- webpackRequire.federation.instance.initShareScopeMap(name, shareScope);
314
- }
296
+ federationInstance.initShareScopeMap(name, shareScope);
315
297
  webpackRequire.S[name] = shareScope;
316
298
  if (webpackRequire.federation.attachShareScopeMap) {
317
299
  webpackRequire.federation.attachShareScopeMap(webpackRequire);
package/dist/index.esm.js CHANGED
@@ -261,35 +261,17 @@ function _object_spread(target) {
261
261
  }
262
262
  return target;
263
263
  }
264
- function isLegacyHost(shareScope, remoteEntryInitOptions) {
265
- if (remoteEntryInitOptions && typeof remoteEntryInitOptions === "object" && remoteEntryInitOptions.hostId) {
266
- return false;
267
- }
268
- if ("version" in shareScope && typeof shareScope["version"] !== "object") {
269
- return true;
270
- }
271
- if ("region" in shareScope && typeof shareScope["region"] !== "object") {
272
- return true;
273
- }
274
- return false;
275
- }
276
264
  function initContainerEntry(options) {
277
265
  var webpackRequire = options.webpackRequire, shareScope = options.shareScope, initScope = options.initScope, shareScopeKey = options.shareScopeKey, remoteEntryInitOptions = options.remoteEntryInitOptions;
278
266
  if (!webpackRequire.S) return;
279
267
  if (!webpackRequire.federation || !webpackRequire.federation.instance || !webpackRequire.federation.initOptions) return;
268
+ var federationInstance = webpackRequire.federation.instance;
280
269
  var name = shareScopeKey || "default";
281
- webpackRequire.federation.instance.initOptions(_object_spread({
270
+ federationInstance.initOptions(_object_spread({
282
271
  name: webpackRequire.federation.initOptions.name,
283
272
  remotes: []
284
273
  }, remoteEntryInitOptions));
285
- if (isLegacyHost(shareScope, remoteEntryInitOptions)) {
286
- var prevShareScope = globalThis.__FEDERATION__.__SHARE__["default"];
287
- if (prevShareScope) {
288
- webpackRequire.federation.instance.initShareScopeMap(name, prevShareScope);
289
- }
290
- } else {
291
- webpackRequire.federation.instance.initShareScopeMap(name, shareScope);
292
- }
274
+ federationInstance.initShareScopeMap(name, shareScope);
293
275
  webpackRequire.S[name] = shareScope;
294
276
  if (webpackRequire.federation.attachShareScopeMap) {
295
277
  webpackRequire.federation.attachShareScopeMap(webpackRequire);
package/dist/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "@module-federation/webpack-bundler-runtime",
4
- "version": "0.0.7",
4
+ "version": "0.0.8",
5
5
  "license": "MIT",
6
6
  "description": "Module Federation Runtime for webpack",
7
7
  "keywords": [
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "public": true,
3
3
  "name": "@module-federation/webpack-bundler-runtime",
4
- "version": "0.0.0-next-20240108071116",
4
+ "version": "0.0.0-next-20240111135630",
5
5
  "license": "MIT",
6
6
  "description": "Module Federation Runtime for webpack",
7
7
  "keywords": [
@@ -20,8 +20,8 @@
20
20
  "module": "./dist/index.esm.js",
21
21
  "types": "./dist/index.cjs.d.ts",
22
22
  "dependencies": {
23
- "@module-federation/runtime": "0.0.0-next-20240108071116",
24
- "@module-federation/sdk": "0.0.0-next-20240108071116"
23
+ "@module-federation/runtime": "0.0.0-next-20240111135630",
24
+ "@module-federation/sdk": "0.0.0-next-20240111135630"
25
25
  },
26
26
  "exports": {
27
27
  ".": {