-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
重复进入子应用时,子应用获取到的路由错误 #220
Comments
你的问题描述不是很清楚,下次请给一下错误日志和示意
随后再尝试跳往子应用的话会出现 404 的错误页 你说的是这个问题吗? 解决方法在 这样子应用的错误就不会影响主应用了 问题原因umi 的 history 路由是依赖于 你可以通过 |
@Deturium 您好,是这个问题。 但是因为我需要兼容ie11,根据文档说明需要 而且经过测试,当 |
不用 jsSandbox 的话,就得手动避免全局变量的冲突了,你这里就是要处理好 history 一个可行的思路是,手动使用 比如这样:https://alili.tech/archive/5ff0b366/#%E5%8F%AA%E6%9C%89%E4%B8%80%E4%B8%AAhistory 比较麻烦,得做不少定制化工作 |
那这个后续会有优化或者jsSandbox兼容IE的计划么 现在可以暂时主应用使用browser,子应用使用hash,但是感觉不太好 |
有计划,见 #182 |
好的,非常感谢🙏 |
@Deturium
umi-plugin-qiankun 的自带 examples,将 master、app1、app2、app3 的 history 改成 hash, 就有这个问题:https://github.com/umijs/umi-plugin-qiankun |
same +1 |
What happens?
重复进入子应用时,子应用获取到的路由错误
最小可复现仓库
https://github.com/viviprprpr/personal-test-umi-plugin-qiankun.git
万分感谢🙏
复现步骤,错误日志以及相关配置
点击进入子应用,浏览器点击返回,连续操作三次必定报警告,然后再点击进入子应用,浏览器路由变了,但是子应用获取到的还是上一个。
相关环境信息
1.3.4
chrome 79.0.3945.88
mac
The text was updated successfully, but these errors were encountered: