@module-federation/bridge-vue3 0.0.0-next-20241104073605 → 0.0.0-next-20241104084202

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/CHANGELOG.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # @module-federation/bridge-vue3
2
2
 
3
- ## 0.0.0-next-20241104073605
3
+ ## 0.0.0-next-20241104084202
4
4
 
5
5
  ### Patch Changes
6
6
 
7
7
  - 3082116: feat: support module isolated reported
8
8
  - Updated dependencies [3082116]
9
- - @module-federation/runtime@0.0.0-next-20241104073605
10
- - @module-federation/bridge-shared@0.0.0-next-20241104073605
9
+ - @module-federation/runtime@0.0.0-next-20241104084202
10
+ - @module-federation/bridge-shared@0.0.0-next-20241104084202
11
11
 
12
12
  ## 0.6.11
13
13
 
package/dist/index.cjs.js CHANGED
@@ -56,4 +56,4 @@ ${o}`:""}`)}}logOriginalInfo(...e){this.enable&&(isBrowserEnv()?(console.info(`%
56
56
  3. ${s} is not online, injected, or loaded.
57
57
  4. ${s} cannot be accessed on the expected.
58
58
  5. The 'beforeRequest' hook was provided but did not return the correct 'remoteInfo' when attempting to load ${s}.
59
- `);const{remote:u}=l,d=getRemoteInfo(u),h=await n.sharedHandler.hooks.lifecycle.afterResolve.emit(_extends$1({id:s},l,{options:n.options,origin:n,remoteInfo:d})),{remote:m,expose:y}=h;assert(m&&y,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${s}.`);let p=n.moduleCache.get(m.name);const _={host:n,remoteInfo:d};return p||(p=new Module(_),n.moduleCache.set(m.name,p)),{module:p,moduleOptions:_,remoteMatchInfo:h}}registerRemote(e,n,o){const{host:r}=this,s=()=>{if(e.alias){const u=n.find(d=>{var h;return e.alias&&(d.name.startsWith(e.alias)||((h=d.alias)==null?void 0:h.startsWith(e.alias)))});assert(!u,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${u&&u.name} name or alias`)}"entry"in e&&isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});const l=n.find(u=>u.name===e.name);if(!l)s(),n.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{const u=[`The remote "${e.name}" is already registered.`,o!=null&&o.force?"Hope you have known that OVERRIDE it may have some unexpected errors":'If you want to merge the remote, you can set "force: true".'];o!=null&&o.force&&(this.removeRemote(l),s(),n.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r})),warn$1(u.join(" "))}}removeRemote(e){try{const{host:o}=this,{name:r}=e,s=o.options.remotes.findIndex(u=>u.name===r);s!==-1&&o.options.remotes.splice(s,1);const l=o.moduleCache.get(e.name);if(l){const u=l.remoteInfo,d=u.entryGlobalName;if(globalThis[d]){var n;(n=Object.getOwnPropertyDescriptor(globalThis,d))!=null&&n.configurable?delete globalThis[d]:globalThis[d]=void 0}const h=getRemoteEntryUniqueKey(l.remoteInfo);globalLoading[h]&&delete globalLoading[h],o.snapshotHandler.manifestCache.delete(u.entry);let m=u.buildVersion?composeKeyWithSeparator(u.name,u.buildVersion):u.name;const y=globalThis.__FEDERATION__.__INSTANCES__.findIndex(_=>u.buildVersion?_.options.id===m:_.name===m);if(y!==-1){const _=globalThis.__FEDERATION__.__INSTANCES__[y];m=_.options.id||m;const E=getGlobalShareScope();let R=!0;const b=[];Object.keys(E).forEach($=>{const T=E[$];T&&Object.keys(T).forEach(I=>{const v=T[I];v&&Object.keys(v).forEach(S=>{const A=v[S];A&&Object.keys(A).forEach(O=>{const w=A[O];w&&typeof w=="object"&&w.from===u.name&&(w.loaded||w.loading?(w.useIn=w.useIn.filter(L=>L!==u.name),w.useIn.length?R=!1:b.push([$,I,S,O])):b.push([$,I,S,O]))})})})}),R&&(_.shareScopeMap={},delete E[m]),b.forEach(([$,T,I,v])=>{var S,A,O;(O=E[$])==null||(A=O[T])==null||(S=A[I])==null||delete S[v]}),globalThis.__FEDERATION__.__INSTANCES__.splice(y,1)}const{hostGlobalSnapshot:p}=getGlobalRemoteInfo(e,o);if(p){const _=p&&"remotesInfo"in p&&p.remotesInfo&&getInfoWithoutType(p.remotesInfo,e.name).key;_&&(delete p.remotesInfo[_],Global.__FEDERATION__.__MANIFEST_LOADING__[_]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[_])}o.moduleCache.delete(e.name)}}catch(o){console.log("removeRemote fail: ",o)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}class FederationHost{initOptions(e){this.registerPlugins(e.plugins);const n=this.formatOptions(this.options,e);return this.options=n,n}async loadShare(e,n){return this.sharedHandler.loadShare(e,n)}loadShareSync(e,n){return this.sharedHandler.loadShareSync(e,n)}initializeSharing(e=DEFAULT_SCOPE,n){return this.sharedHandler.initializeSharing(e,n)}initRawContainer(e,n,o){const r=getRemoteInfo({name:e,entry:n}),s=new Module({host:this,remoteInfo:r});return s.remoteEntryExports=o,this.moduleCache.set(e,s),s}async loadRemote(e,n){return this.remoteHandler.loadRemote(e,n)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,n,o={}){this.sharedHandler.initShareScopeMap(e,n,o)}formatOptions(e,n){const{shared:o}=formatShareConfigs(e,n),{userOptions:r,options:s}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:n,options:e,shareInfo:o}),l=this.remoteHandler.formatAndRegisterRemote(s,r),{shared:u}=this.sharedHandler.registerShared(s,r),d=[...s.plugins];r.plugins&&r.plugins.forEach(m=>{d.includes(m)||d.push(m)});const h=_extends$1({},e,n,{plugins:d,remotes:l,shared:u});return this.hooks.lifecycle.init.emit({origin:this,options:h}),h}registerPlugins(e){const n=registerPlugins(e,[this.hooks,this.remoteHandler.hooks,this.sharedHandler.hooks,this.snapshotHandler.hooks,this.loaderHook]);this.options.plugins=this.options.plugins.reduce((o,r)=>(r&&o&&!o.find(s=>s.name===r.name)&&o.push(r),o),n||[])}registerRemotes(e,n){return this.remoteHandler.registerRemotes(e,n)}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.6.11",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const n={id:getBuilderId(),name:e.name,plugins:[snapshotPlugin(),generatePreloadAssetsPlugin()],remotes:[],shared:{},inBrowser:isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}setGlobalFederationConstructor(FederationHost);var pluginHelper=Object.freeze({__proto__:null,AsyncHook,AsyncWaterfallHook,PluginSystem,SyncHook,SyncWaterfallHook});const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,getGlobalFederationInstance,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded,registerPlugins,pluginHelper};var helpers={global:GlobalUtils,share:ShareUtils};function registerBridgeLifeCycle(){const{registerPlugins:t,pluginHelper:e}=helpers.global;return new e.PluginSystem({beforeBridgeRender:new e.SyncHook,beforeBridgeDestroy:new e.SyncHook}),null}const RemoteApp=Vue.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,providerInfo:Function},setup(t){const e=Vue.ref(null),n=Vue.ref(null),o=Vue.ref(""),r=VueRouter.useRoute(),s=registerBridgeLifeCycle(),l=()=>{var m,y,p;const d=(m=t.providerInfo)==null?void 0:m.call(t);n.value=d;const h={name:t.moduleName,dom:e.value,basename:t.basename,memoryRoute:t.memoryRoute};LoggerInstance.log("createRemoteComponent LazyComponent render >>>",h),s&&((y=s==null?void 0:s.lifecycle)!=null&&y.beforeBridgeRender)&&((p=s==null?void 0:s.lifecycle)==null||p.beforeBridgeRender.emit({...h})),d.render(h)},u=Vue.watch(()=>r.path,d=>{d!==r.path&&l(),o.value!==""&&o.value!==d&&(LoggerInstance.log("createRemoteComponent dispatchPopstateEnv >>>",{...t,pathname:r.path}),f()),o.value=d});return Vue.onMounted(()=>{l()}),Vue.onBeforeUnmount(()=>{var d,h,m;LoggerInstance.log("createRemoteComponent LazyComponent destroy >>>",{...t}),u(),s&&((d=s==null?void 0:s.lifecycle)!=null&&d.beforeBridgeRender)&&((h=s==null?void 0:s.lifecycle)==null||h.beforeBridgeDestroy.emit({name:t.moduleName,dom:e.value,basename:t.basename,memoryRoute:t.memoryRoute})),(m=n.value)==null||m.destroy({dom:e.value})}),()=>Vue.createVNode("div",{ref:e},null)}});function createRemoteComponent(t){return Vue.defineAsyncComponent({__APP_VERSION__:"0.6.11",loader:async()=>{var d;const e=VueRouter.useRoute();let n="/";const o=(d=e.matched[0])==null?void 0:d.path;o&&(o.endsWith("/:pathMatch(.*)*")?n=o.replace("/:pathMatch(.*)*",""):n=e.matched[0].path);const r=(t==null?void 0:t.export)||"default";LoggerInstance.log("createRemoteComponent LazyComponent create >>>",{basename:n,info:t});const s=await t.loader(),l=s&&s[Symbol.for("mf_module_id")],u=s[r];if(LoggerInstance.log("createRemoteComponent LazyComponent loadRemote info >>>",{name:l,module:s,exportName:r,basename:n,route:e}),r in s&&typeof u=="function")return{render(){return Vue.h(RemoteApp,{moduleName:l,...t,providerInfo:u,basename:n})}};throw new Error("module not found")},loadingComponent:{template:"<div>Loading...</div>"},errorComponent:{template:"<div>Error loading component</div>"},delay:200,timeout:3e3})}exports.createBridgeComponent=createBridgeComponent;exports.createRemoteComponent=createRemoteComponent;
59
+ `);const{remote:u}=l,d=getRemoteInfo(u),h=await n.sharedHandler.hooks.lifecycle.afterResolve.emit(_extends$1({id:s},l,{options:n.options,origin:n,remoteInfo:d})),{remote:m,expose:y}=h;assert(m&&y,`The 'beforeRequest' hook was executed, but it failed to return the correct 'remote' and 'expose' values while loading ${s}.`);let p=n.moduleCache.get(m.name);const _={host:n,remoteInfo:d};return p||(p=new Module(_),n.moduleCache.set(m.name,p)),{module:p,moduleOptions:_,remoteMatchInfo:h}}registerRemote(e,n,o){const{host:r}=this,s=()=>{if(e.alias){const u=n.find(d=>{var h;return e.alias&&(d.name.startsWith(e.alias)||((h=d.alias)==null?void 0:h.startsWith(e.alias)))});assert(!u,`The alias ${e.alias} of remote ${e.name} is not allowed to be the prefix of ${u&&u.name} name or alias`)}"entry"in e&&isBrowserEnv()&&!e.entry.startsWith("http")&&(e.entry=new URL(e.entry,window.location.origin).href),e.shareScope||(e.shareScope=DEFAULT_SCOPE),e.type||(e.type=DEFAULT_REMOTE_TYPE)};this.hooks.lifecycle.beforeRegisterRemote.emit({remote:e,origin:r});const l=n.find(u=>u.name===e.name);if(!l)s(),n.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r});else{const u=[`The remote "${e.name}" is already registered.`,o!=null&&o.force?"Hope you have known that OVERRIDE it may have some unexpected errors":'If you want to merge the remote, you can set "force: true".'];o!=null&&o.force&&(this.removeRemote(l),s(),n.push(e),this.hooks.lifecycle.registerRemote.emit({remote:e,origin:r})),warn$1(u.join(" "))}}removeRemote(e){try{const{host:o}=this,{name:r}=e,s=o.options.remotes.findIndex(u=>u.name===r);s!==-1&&o.options.remotes.splice(s,1);const l=o.moduleCache.get(e.name);if(l){const u=l.remoteInfo,d=u.entryGlobalName;if(globalThis[d]){var n;(n=Object.getOwnPropertyDescriptor(globalThis,d))!=null&&n.configurable?delete globalThis[d]:globalThis[d]=void 0}const h=getRemoteEntryUniqueKey(l.remoteInfo);globalLoading[h]&&delete globalLoading[h],o.snapshotHandler.manifestCache.delete(u.entry);let m=u.buildVersion?composeKeyWithSeparator(u.name,u.buildVersion):u.name;const y=globalThis.__FEDERATION__.__INSTANCES__.findIndex(_=>u.buildVersion?_.options.id===m:_.name===m);if(y!==-1){const _=globalThis.__FEDERATION__.__INSTANCES__[y];m=_.options.id||m;const E=getGlobalShareScope();let R=!0;const b=[];Object.keys(E).forEach($=>{const T=E[$];T&&Object.keys(T).forEach(I=>{const v=T[I];v&&Object.keys(v).forEach(S=>{const A=v[S];A&&Object.keys(A).forEach(O=>{const w=A[O];w&&typeof w=="object"&&w.from===u.name&&(w.loaded||w.loading?(w.useIn=w.useIn.filter(L=>L!==u.name),w.useIn.length?R=!1:b.push([$,I,S,O])):b.push([$,I,S,O]))})})})}),R&&(_.shareScopeMap={},delete E[m]),b.forEach(([$,T,I,v])=>{var S,A,O;(O=E[$])==null||(A=O[T])==null||(S=A[I])==null||delete S[v]}),globalThis.__FEDERATION__.__INSTANCES__.splice(y,1)}const{hostGlobalSnapshot:p}=getGlobalRemoteInfo(e,o);if(p){const _=p&&"remotesInfo"in p&&p.remotesInfo&&getInfoWithoutType(p.remotesInfo,e.name).key;_&&(delete p.remotesInfo[_],Global.__FEDERATION__.__MANIFEST_LOADING__[_]&&delete Global.__FEDERATION__.__MANIFEST_LOADING__[_])}o.moduleCache.delete(e.name)}}catch(o){console.log("removeRemote fail: ",o)}}constructor(e){this.hooks=new PluginSystem({beforeRegisterRemote:new SyncWaterfallHook("beforeRegisterRemote"),registerRemote:new SyncWaterfallHook("registerRemote"),beforeRequest:new AsyncWaterfallHook("beforeRequest"),onLoad:new AsyncHook("onLoad"),handlePreloadModule:new SyncHook("handlePreloadModule"),errorLoadRemote:new AsyncHook("errorLoadRemote"),beforePreloadRemote:new AsyncHook("beforePreloadRemote"),generatePreloadAssets:new AsyncHook("generatePreloadAssets"),afterPreloadRemote:new AsyncHook,loadEntry:new AsyncHook}),this.host=e,this.idToRemoteMap={}}}class FederationHost{initOptions(e){this.registerPlugins(e.plugins);const n=this.formatOptions(this.options,e);return this.options=n,n}async loadShare(e,n){return this.sharedHandler.loadShare(e,n)}loadShareSync(e,n){return this.sharedHandler.loadShareSync(e,n)}initializeSharing(e=DEFAULT_SCOPE,n){return this.sharedHandler.initializeSharing(e,n)}initRawContainer(e,n,o){const r=getRemoteInfo({name:e,entry:n}),s=new Module({host:this,remoteInfo:r});return s.remoteEntryExports=o,this.moduleCache.set(e,s),s}async loadRemote(e,n){return this.remoteHandler.loadRemote(e,n)}async preloadRemote(e){return this.remoteHandler.preloadRemote(e)}initShareScopeMap(e,n,o={}){this.sharedHandler.initShareScopeMap(e,n,o)}formatOptions(e,n){const{shared:o}=formatShareConfigs(e,n),{userOptions:r,options:s}=this.hooks.lifecycle.beforeInit.emit({origin:this,userOptions:n,options:e,shareInfo:o}),l=this.remoteHandler.formatAndRegisterRemote(s,r),{shared:u}=this.sharedHandler.registerShared(s,r),d=[...s.plugins];r.plugins&&r.plugins.forEach(m=>{d.includes(m)||d.push(m)});const h=_extends$1({},e,n,{plugins:d,remotes:l,shared:u});return this.hooks.lifecycle.init.emit({origin:this,options:h}),h}registerPlugins(e){const n=registerPlugins(e,[this.hooks,this.remoteHandler.hooks,this.sharedHandler.hooks,this.snapshotHandler.hooks,this.loaderHook,this.bridgeHook]);this.options.plugins=this.options.plugins.reduce((o,r)=>(r&&o&&!o.find(s=>s.name===r.name)&&o.push(r),o),n||[])}registerRemotes(e,n){return this.remoteHandler.registerRemotes(e,n)}constructor(e){this.hooks=new PluginSystem({beforeInit:new SyncWaterfallHook("beforeInit"),init:new SyncHook,beforeInitContainer:new AsyncWaterfallHook("beforeInitContainer"),initContainer:new AsyncWaterfallHook("initContainer")}),this.version="0.6.11",this.moduleCache=new Map,this.loaderHook=new PluginSystem({getModuleInfo:new SyncHook,createScript:new SyncHook,createLink:new SyncHook,fetch:new AsyncHook}),this.bridgeHook=new PluginSystem({beforeBridgeRender:new SyncHook,afterBridgeRender:new SyncHook,beforeBridgeDestroy:new SyncHook,afterBridgeDestroy:new SyncHook});const n={id:getBuilderId(),name:e.name,plugins:[snapshotPlugin(),generatePreloadAssetsPlugin()],remotes:[],shared:{},inBrowser:isBrowserEnv()};this.name=e.name,this.options=n,this.snapshotHandler=new SnapshotHandler(this),this.sharedHandler=new SharedHandler(this),this.remoteHandler=new RemoteHandler(this),this.shareScopeMap=this.sharedHandler.shareScopeMap,this.registerPlugins([...n.plugins,...e.plugins||[]]),this.options=this.formatOptions(n,e)}}setGlobalFederationConstructor(FederationHost);var pluginHelper=Object.freeze({__proto__:null,AsyncHook,AsyncWaterfallHook,PluginSystem,SyncHook,SyncWaterfallHook});const ShareUtils={getRegisteredShare,getGlobalShareScope},GlobalUtils={Global,nativeGlobal,resetFederationGlobalInfo,getGlobalFederationInstance,setGlobalFederationInstance,getGlobalFederationConstructor,setGlobalFederationConstructor,getInfoWithoutType,getGlobalSnapshot,getTargetSnapshotInfoByModuleInfo,getGlobalSnapshotInfoByModuleInfo,setGlobalSnapshotInfoByModuleInfo,addGlobalSnapshot,getRemoteEntryExports,registerGlobalPlugins,getGlobalHostPlugins,getPreloaded,setPreloaded,registerPlugins,pluginHelper};var helpers={global:GlobalUtils,share:ShareUtils};function registerBridgeLifeCycle(){const{registerPlugins:t,pluginHelper:e}=helpers.global;return new e.PluginSystem({beforeBridgeRender:new e.SyncHook,beforeBridgeDestroy:new e.SyncHook}),null}const RemoteApp=Vue.defineComponent({name:"RemoteApp",props:{moduleName:String,basename:String,memoryRoute:Object,providerInfo:Function},setup(t){const e=Vue.ref(null),n=Vue.ref(null),o=Vue.ref(""),r=VueRouter.useRoute(),s=registerBridgeLifeCycle(),l=()=>{var m,y,p;const d=(m=t.providerInfo)==null?void 0:m.call(t);n.value=d;const h={name:t.moduleName,dom:e.value,basename:t.basename,memoryRoute:t.memoryRoute};LoggerInstance.log("createRemoteComponent LazyComponent render >>>",h),s&&((y=s==null?void 0:s.lifecycle)!=null&&y.beforeBridgeRender)&&((p=s==null?void 0:s.lifecycle)==null||p.beforeBridgeRender.emit({...h})),d.render(h)},u=Vue.watch(()=>r.path,d=>{d!==r.path&&l(),o.value!==""&&o.value!==d&&(LoggerInstance.log("createRemoteComponent dispatchPopstateEnv >>>",{...t,pathname:r.path}),f()),o.value=d});return Vue.onMounted(()=>{l()}),Vue.onBeforeUnmount(()=>{var d,h,m;LoggerInstance.log("createRemoteComponent LazyComponent destroy >>>",{...t}),u(),s&&((d=s==null?void 0:s.lifecycle)!=null&&d.beforeBridgeRender)&&((h=s==null?void 0:s.lifecycle)==null||h.beforeBridgeDestroy.emit({name:t.moduleName,dom:e.value,basename:t.basename,memoryRoute:t.memoryRoute})),(m=n.value)==null||m.destroy({dom:e.value})}),()=>Vue.createVNode("div",{ref:e},null)}});function createRemoteComponent(t){return Vue.defineAsyncComponent({__APP_VERSION__:"0.6.11",loader:async()=>{var d;const e=VueRouter.useRoute();let n="/";const o=(d=e.matched[0])==null?void 0:d.path;o&&(o.endsWith("/:pathMatch(.*)*")?n=o.replace("/:pathMatch(.*)*",""):n=e.matched[0].path);const r=(t==null?void 0:t.export)||"default";LoggerInstance.log("createRemoteComponent LazyComponent create >>>",{basename:n,info:t});const s=await t.loader(),l=s&&s[Symbol.for("mf_module_id")],u=s[r];if(LoggerInstance.log("createRemoteComponent LazyComponent loadRemote info >>>",{name:l,module:s,exportName:r,basename:n,route:e}),r in s&&typeof u=="function")return{render(){return Vue.h(RemoteApp,{moduleName:l,...t,providerInfo:u,basename:n})}};throw new Error("module not found")},loadingComponent:{template:"<div>Loading...</div>"},errorComponent:{template:"<div>Error loading component</div>"},delay:200,timeout:3e3})}exports.createBridgeComponent=createBridgeComponent;exports.createRemoteComponent=createRemoteComponent;
package/dist/index.es.js CHANGED
@@ -2317,7 +2317,8 @@ class FederationHost {
2317
2317
  this.remoteHandler.hooks,
2318
2318
  this.sharedHandler.hooks,
2319
2319
  this.snapshotHandler.hooks,
2320
- this.loaderHook
2320
+ this.loaderHook,
2321
+ this.bridgeHook
2321
2322
  ]);
2322
2323
  this.options.plugins = this.options.plugins.reduce((o, r) => (r && o && !o.find((s) => s.name === r.name) && o.push(r), o), n || []);
2323
2324
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@module-federation/bridge-vue3",
3
3
  "author": "zhouxiao <codingzx@gmail.com>",
4
- "version": "0.0.0-next-20241104073605",
4
+ "version": "0.0.0-next-20241104084202",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -24,10 +24,10 @@
24
24
  "peerDependencies": {
25
25
  "vue": "=3",
26
26
  "vue-router": "=3",
27
- "@module-federation/runtime": "0.0.0-next-20241104073605"
27
+ "@module-federation/runtime": "0.0.0-next-20241104084202"
28
28
  },
29
29
  "dependencies": {
30
- "@module-federation/bridge-shared": "0.0.0-next-20241104073605"
30
+ "@module-federation/bridge-shared": "0.0.0-next-20241104084202"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@vitejs/plugin-vue": "^5.0.4",