Open JD-Wang opened 2 years ago
@JD-Wang did you found any solution for you're issue?
any update?
i have found a kind of work around but biggest drawback is that one need to add 4 line of code in qiankun lib and 2 in this plugin
I found that the hooks don't work because I import vue-global-api
in my project, it mounts the hooks to the window object, so when another sub-app call such as the onMounted
, it will trigger the global onMounted method that context is wrong.
I use unplugin-auto-import/vite
plugin instead, and it works now.
hope it can help someone.
loadMicroApp调用多个子应用,子应用html加载完后就会进行global.qiankunName赋值,全局的global.qiankunName 只能设置一个,renderWithQiankun执行时就会导致只执行最后设置qiankunName 的子应用,其他的子应用生命周期不会被执行
现在只能同步阻塞解决
loadMicroApp({ ... // 子应用1 }).bootstrapPromise.then(() => { loadMicroApp({ ... // 子应用2 }) })
那有办法支持同时并发加载多个vue3的子应用吗?