@module-federation/sdk 0.0.0-next-20240909083238 → 0.0.0-next-20240909101028

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
@@ -2,6 +2,8 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
+ var polyfills = require('./polyfills.cjs.js');
6
+
5
7
  const FederationModuleManifest = 'federation-manifest.json';
6
8
  const MANIFEST_EXT = '.json';
7
9
  const BROWSER_LOG_KEY = 'FEDERATION_DEBUG';
@@ -248,17 +250,6 @@ function safeToString(info) {
248
250
  }
249
251
  }
250
252
 
251
- function _extends() {
252
- _extends = Object.assign || function assign(target) {
253
- for(var i = 1; i < arguments.length; i++){
254
- var source = arguments[i];
255
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
256
- }
257
- return target;
258
- };
259
- return _extends.apply(this, arguments);
260
- }
261
-
262
253
  const simpleJoinRemoteEntry = (rPath, rName)=>{
263
254
  if (!rPath) {
264
255
  return rName;
@@ -362,23 +353,23 @@ function generateSnapshotFromManifest(manifest, options = {}) {
362
353
  };
363
354
  if ((_manifest_metaData = manifest.metaData) == null ? void 0 : _manifest_metaData.prefetchInterface) {
364
355
  const prefetchInterface = manifest.metaData.prefetchInterface;
365
- basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
356
+ basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
366
357
  prefetchInterface
367
358
  });
368
359
  }
369
360
  if ((_manifest_metaData1 = manifest.metaData) == null ? void 0 : _manifest_metaData1.prefetchEntry) {
370
361
  const { path, name, type } = manifest.metaData.prefetchEntry;
371
- basicRemoteSnapshot = _extends({}, basicRemoteSnapshot, {
362
+ basicRemoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
372
363
  prefetchEntry: simpleJoinRemoteEntry(path, name),
373
364
  prefetchEntryType: type
374
365
  });
375
366
  }
376
367
  if ('publicPath' in manifest.metaData) {
377
- remoteSnapshot = _extends({}, basicRemoteSnapshot, {
368
+ remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
378
369
  publicPath: getPublicPath()
379
370
  });
380
371
  } else {
381
- remoteSnapshot = _extends({}, basicRemoteSnapshot, {
372
+ remoteSnapshot = polyfills._extends({}, basicRemoteSnapshot, {
382
373
  getPublicPath: getPublicPath()
383
374
  });
384
375
  }
@@ -571,7 +562,7 @@ function loadScript(url, info) {
571
562
  const { script, needAttach } = createScript({
572
563
  url,
573
564
  cb: resolve,
574
- attrs: _extends({
565
+ attrs: polyfills._extends({
575
566
  fetchpriority: 'high'
576
567
  }, attrs),
577
568
  createScriptHook,
@@ -707,7 +698,7 @@ function normalizeOptions(enableDefault, defaultOptions, key) {
707
698
  return defaultOptions;
708
699
  }
709
700
  if (options && typeof options === 'object') {
710
- return _extends({}, defaultOptions, options);
701
+ return polyfills._extends({}, defaultOptions, options);
711
702
  }
712
703
  throw new Error(`Unexpected type for \`${key}\`, expect boolean/undefined/object, got: ${typeof options}`);
713
704
  };
package/dist/index.esm.js CHANGED
@@ -1,3 +1,5 @@
1
+ import { _ as _extends } from './polyfills.esm.js';
2
+
1
3
  const FederationModuleManifest = 'federation-manifest.json';
2
4
  const MANIFEST_EXT = '.json';
3
5
  const BROWSER_LOG_KEY = 'FEDERATION_DEBUG';
@@ -244,17 +246,6 @@ function safeToString(info) {
244
246
  }
245
247
  }
246
248
 
247
- function _extends() {
248
- _extends = Object.assign || function assign(target) {
249
- for(var i = 1; i < arguments.length; i++){
250
- var source = arguments[i];
251
- for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
252
- }
253
- return target;
254
- };
255
- return _extends.apply(this, arguments);
256
- }
257
-
258
249
  const simpleJoinRemoteEntry = (rPath, rName)=>{
259
250
  if (!rPath) {
260
251
  return rName;
package/dist/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.6.0",
3
+ "version": "0.6.1",
4
4
  "license": "MIT",
5
5
  "description": "A sdk for support module federation",
6
6
  "keywords": [
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ function _extends() {
4
+ _extends = Object.assign || function assign(target) {
5
+ for(var i = 1; i < arguments.length; i++){
6
+ var source = arguments[i];
7
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
8
+ }
9
+ return target;
10
+ };
11
+ return _extends.apply(this, arguments);
12
+ }
13
+
14
+ exports._extends = _extends;
@@ -0,0 +1,12 @@
1
+ function _extends() {
2
+ _extends = Object.assign || function assign(target) {
3
+ for(var i = 1; i < arguments.length; i++){
4
+ var source = arguments[i];
5
+ for(var key in source)if (Object.prototype.hasOwnProperty.call(source, key)) target[key] = source[key];
6
+ }
7
+ return target;
8
+ };
9
+ return _extends.apply(this, arguments);
10
+ }
11
+
12
+ export { _extends as _ };
@@ -175,6 +175,9 @@ export interface ModuleFederationPluginOptions {
175
175
  dts?: boolean | PluginDtsOptions;
176
176
  async?: boolean | AsyncBoundaryOptions;
177
177
  virtualRuntimeEntry?: boolean;
178
+ experiments?: {
179
+ federationRuntime?: false | 'hoisted';
180
+ };
178
181
  }
179
182
  /**
180
183
  * Modules that should be exposed by this container. Property names are used as public paths.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/sdk",
3
- "version": "0.0.0-next-20240909083238",
3
+ "version": "0.0.0-next-20240909101028",
4
4
  "license": "MIT",
5
5
  "description": "A sdk for support module federation",
6
6
  "keywords": [