@module-federation/runtime 0.0.0-next-20240227070821 → 0.0.0-next-20240227080544
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 +2 -5
- package/dist/index.esm.js +4 -5
- package/dist/share.esm.js +1 -1
- package/dist/src/core.d.ts +0 -2
- package/dist/src/index.d.ts +0 -1
- package/dist/src/utils/index.d.ts +0 -1
- package/package.json +2 -2
package/dist/index.cjs.js
CHANGED
|
@@ -136,6 +136,7 @@ async function loadEntryScript({ name, globalName, entry, createScriptHook }) {
|
|
|
136
136
|
1. '${entry}' is not the correct URL, or the remoteEntry resource or name is incorrect.\n
|
|
137
137
|
2. ${remoteEntryKey} cannot be used to get remoteEntry exports in the window object.
|
|
138
138
|
`);
|
|
139
|
+
console.log(entryExports);
|
|
139
140
|
return entryExports;
|
|
140
141
|
}).catch((e)=>{
|
|
141
142
|
return e;
|
|
@@ -783,9 +784,7 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
783
784
|
id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
|
|
784
785
|
name: remoteInfo.name,
|
|
785
786
|
remoteSnapshot: moduleInfoSnapshot,
|
|
786
|
-
preloadConfig
|
|
787
|
-
remote: remoteInfo,
|
|
788
|
-
origin
|
|
787
|
+
preloadConfig
|
|
789
788
|
});
|
|
790
789
|
const preloaded = share.getPreloaded(exposeFullPath);
|
|
791
790
|
if (preloaded) {
|
|
@@ -1675,8 +1674,6 @@ Object.defineProperty(exports, 'loadScript', {
|
|
|
1675
1674
|
get: function () { return sdk.loadScript; }
|
|
1676
1675
|
});
|
|
1677
1676
|
exports.FederationHost = FederationHost;
|
|
1678
|
-
exports.getRemoteEntry = getRemoteEntry;
|
|
1679
|
-
exports.getRemoteInfo = getRemoteInfo;
|
|
1680
1677
|
exports.init = init;
|
|
1681
1678
|
exports.loadRemote = loadRemote;
|
|
1682
1679
|
exports.loadShare = loadShare;
|
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as getGlobalHostPlugins,
|
|
1
|
+
import { g as getGlobalHostPlugins, D as DEFAULT_REMOTE_TYPE, a as DEFAULT_SCOPE, b as globalLoading, c as getRemoteEntryExports, d as assert, s as safeToString, e as getFMId, i as isObject, f as error, w as warn, h as isPlainObject, j as isRemoteInfoWithEntry, k as isPureRemoteEntry, l as getRegisteredShare, m as getInfoWithoutType, n as getPreloaded, o as setPreloaded, p as getGlobalSnapshotInfoByModuleInfo, q as addGlobalSnapshot, r as setGlobalSnapshotInfoByModuleInfo, t as getGlobalSnapshot, G as Global, u as getGlobalShareScope, v as formatShareConfigs, x as isBrowserEnv, y as getBuilderId, z as addUniqueItem, A as setGlobalFederationConstructor, B as getGlobalFederationInstance, C as getGlobalFederationConstructor, E as setGlobalFederationInstance } from './share.esm.js';
|
|
2
2
|
export { F as registerGlobalPlugins } from './share.esm.js';
|
|
3
3
|
import { composeKeyWithSeparator, loadScriptNode, loadScript, createLink, getResourceUrl, isManifestProvider, generateSnapshotFromManifest } from '@module-federation/sdk';
|
|
4
4
|
export { loadScript } from '@module-federation/sdk';
|
|
@@ -134,6 +134,7 @@ async function loadEntryScript({ name, globalName, entry, createScriptHook }) {
|
|
|
134
134
|
1. '${entry}' is not the correct URL, or the remoteEntry resource or name is incorrect.\n
|
|
135
135
|
2. ${remoteEntryKey} cannot be used to get remoteEntry exports in the window object.
|
|
136
136
|
`);
|
|
137
|
+
console.log(entryExports);
|
|
137
138
|
return entryExports;
|
|
138
139
|
}).catch((e)=>{
|
|
139
140
|
return e;
|
|
@@ -781,9 +782,7 @@ function generatePreloadAssets(origin, preloadOptions, remote, globalSnapshot, r
|
|
|
781
782
|
id: assetsInfo.moduleName === '.' ? remoteInfo.name : exposeFullPath,
|
|
782
783
|
name: remoteInfo.name,
|
|
783
784
|
remoteSnapshot: moduleInfoSnapshot,
|
|
784
|
-
preloadConfig
|
|
785
|
-
remote: remoteInfo,
|
|
786
|
-
origin
|
|
785
|
+
preloadConfig
|
|
787
786
|
});
|
|
788
787
|
const preloaded = getPreloaded(exposeFullPath);
|
|
789
788
|
if (preloaded) {
|
|
@@ -1667,4 +1666,4 @@ function preloadRemote(...args) {
|
|
|
1667
1666
|
// Inject for debug
|
|
1668
1667
|
setGlobalFederationConstructor(FederationHost);
|
|
1669
1668
|
|
|
1670
|
-
export { FederationHost,
|
|
1669
|
+
export { FederationHost, init, loadRemote, loadShare, loadShareSync, preloadRemote };
|
package/dist/share.esm.js
CHANGED
|
@@ -794,4 +794,4 @@ function getGlobalShareScope() {
|
|
|
794
794
|
return Global.__FEDERATION__.__SHARE__;
|
|
795
795
|
}
|
|
796
796
|
|
|
797
|
-
export { setGlobalFederationConstructor as A, getGlobalFederationInstance as B, getGlobalFederationConstructor as C, DEFAULT_REMOTE_TYPE as D, setGlobalFederationInstance as E, registerGlobalPlugins as F, Global as G, nativeGlobal as H, resetFederationGlobalInfo as I, getTargetSnapshotInfoByModuleInfo as J,
|
|
797
|
+
export { setGlobalFederationConstructor as A, getGlobalFederationInstance as B, getGlobalFederationConstructor as C, DEFAULT_REMOTE_TYPE as D, setGlobalFederationInstance as E, registerGlobalPlugins as F, Global as G, nativeGlobal as H, resetFederationGlobalInfo as I, getTargetSnapshotInfoByModuleInfo as J, DEFAULT_SCOPE as a, globalLoading as b, getRemoteEntryExports as c, assert as d, getFMId as e, error as f, getGlobalHostPlugins as g, isPlainObject as h, isObject as i, isRemoteInfoWithEntry as j, isPureRemoteEntry as k, getRegisteredShare as l, getInfoWithoutType as m, getPreloaded as n, setPreloaded as o, getGlobalSnapshotInfoByModuleInfo as p, addGlobalSnapshot as q, setGlobalSnapshotInfoByModuleInfo as r, safeToString as s, getGlobalSnapshot as t, getGlobalShareScope as u, formatShareConfigs as v, warn as w, isBrowserEnv as x, getBuilderId as y, addUniqueItem as z };
|
package/dist/src/core.d.ts
CHANGED
|
@@ -67,10 +67,8 @@ export declare class FederationHost {
|
|
|
67
67
|
handlePreloadModule: SyncHook<{
|
|
68
68
|
id: string;
|
|
69
69
|
name: string;
|
|
70
|
-
remote: Remote;
|
|
71
70
|
remoteSnapshot: ModuleInfo;
|
|
72
71
|
preloadConfig: PreloadRemoteArgs;
|
|
73
|
-
origin: FederationHost;
|
|
74
72
|
}, void>;
|
|
75
73
|
errorLoadRemote: AsyncHook<[{
|
|
76
74
|
id: string;
|
package/dist/src/index.d.ts
CHANGED
|
@@ -2,7 +2,6 @@ import { FederationHost } from './core';
|
|
|
2
2
|
import { UserOptions, FederationRuntimePlugin } from './type';
|
|
3
3
|
export { FederationHost } from './core';
|
|
4
4
|
export { registerGlobalPlugins } from './global';
|
|
5
|
-
export { getRemoteEntry, getRemoteInfo } from './utils';
|
|
6
5
|
export { loadScript } from '@module-federation/sdk';
|
|
7
6
|
export type { Federation } from './global';
|
|
8
7
|
export type { FederationRuntimePlugin };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@module-federation/runtime",
|
|
3
|
-
"version": "0.0.0-next-
|
|
3
|
+
"version": "0.0.0-next-20240227080544",
|
|
4
4
|
"author": "zhouxiao <codingzx@gmail.com>",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.esm.js",
|
|
@@ -45,6 +45,6 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@module-federation/sdk": "0.0.0-next-
|
|
48
|
+
"@module-federation/sdk": "0.0.0-next-20240227080544"
|
|
49
49
|
}
|
|
50
50
|
}
|