qiankun icon indicating copy to clipboard operation
qiankun copied to clipboard

能提供一个共享组件及公共方法的方案吗,尝试了使用MF,遇到很多坑,暂时放弃

Open huntJs opened this issue 2 years ago • 12 comments

Background

A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

Proposal

Describe the solution you'd like, better to provide some pseudo code.

Additional context

Add any other context or screenshots about the feature request here.

huntJs avatar May 25 '22 06:05 huntJs

https://juejin.cn/post/6856569463950639117#heading-25

gongshun avatar May 25 '22 07:05 gongshun

I met an issue that the parent Application(vue3+vite2.0) shared some common components to the child Application,binding the common component to the window , but if the common component exist slot , the child Application will throw an exception( vue3+ webpack5), image In parent Application, i had config below image Have you ever encountered this problem~

huntJs avatar Jun 05 '22 09:06 huntJs

参考这个方案看看呢,看看能不能解决你的问题。 https://github.com/wwervin72/microFe-qiankun-module-federation/tree/master

wwervin72 avatar Jul 29 '22 07:07 wwervin72

参考这个方案看看呢,看看能不能解决你的问题。 https://github.com/wwervin72/microFe-qiankun-module-federation/tree/master

你确定,你这个demo里,有带slot的共享组件吗?

rookiePrgrmer avatar Sep 03 '22 01:09 rookiePrgrmer

推荐 hel-micro https://github.com/tnfe/hel hel-micro, 模块联邦 sdk 化,免构建、热更新、工具链无关的微模块方案 相关文章介绍:hel-micro 模块联邦新革命

fantasticsoul avatar Oct 22 '22 10:10 fantasticsoul

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B

报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope

UNDERCOVERj avatar Nov 14 '22 05:11 UNDERCOVERj

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B

报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope

same here

vincenteof avatar Nov 25 '22 15:11 vincenteof

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B

报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope

same here

我也碰见这个问题了,定位了下,是因为 子应用的remoteEntry.js里注册了shared模块,index.js里也注册了shared模块。在父应用中加载子应用共享模块的同时,启动子应用。这时,会从remoteEntry.js和index.js先后注册共享模块,导致后面注册时的共享模块和前面注册的不是同一个内存地址,就会抛出这个异常。 目前还没找到解决方案

xuebigshuai avatar Feb 11 '23 01:02 xuebigshuai

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B

报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope

same here

我也碰见这个问题了,定位了下,是因为 子应用的remoteEntry.js里注册了shared模块,index.js里也注册了shared模块。在父应用中加载子应用共享模块的同时,启动子应用。这时,会从remoteEntry.js和index.js先后注册共享模块,导致后面注册时的共享模块和前面注册的不是同一个内存地址,就会抛出这个异常。 目前还没找到解决方案

请问解决了吗,我也遇到了

wangronglei avatar Mar 06 '23 02:03 wangronglei

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B 报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope same here 我也碰见这个问题了,定位了下,是因为 子应用的remoteEntry.js里注册了shared模块,index.js里也注册了shared模块。在父应用中加载子应用共享模块的同时,启动子应用。这时,会从remoteEntry.js和index.js先后注册共享模块,导致后面注册时的共享模块和前面注册的不是同一个内存地址,就会抛出这个异常。 目前还没找到解决方案

我这边遇到一个问题。主子应用中引入同一个远程模块A,远程模块A引入了远程模块B 报:Uncaught (in promise) Error: Container initialization failed as it has already been initialized with a different share scope same here 我也碰见这个问题了,定位了下,是因为 子应用的remoteEntry.js里注册了shared模块,index.js里也注册了shared模块。在父应用中加载子应用共享模块的同时,启动子应用。这时,会从remoteEntry.js和index.js先后注册共享模块,导致后面注册时的共享模块和前面注册的不是同一个内存地址,就会抛出这个异常。 目前还没找到解决方案

请问解决了吗,我也遇到了

还没解决,现在又回过头来解决这个问题了,请问,你解决了吗?

xuebigshuai avatar Nov 16 '23 09:11 xuebigshuai