Skip to content
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

2.11.1版本下出现 You shoule not use <Switch> ouside a <Router> #3576

Closed
Anonymity94 opened this issue Nov 7, 2019 · 7 comments
Closed

Comments

@Anonymity94
Copy link

What happens?

在umi@2.11.1版本下,出现了You shoule not use <Switch> ouside a <Router>

截图如下:
image

回退到 umi@2.10.7 后,没有该问题。
目前只测试了这2个版本, 2.10.7 ~ 2.11.1 之间的版本是否有这个问题尚未测试

Mini Showcase Repository(REQUIRED)

暂无最小复现仓库<等忙完再补充>

How To Reproduce

<待补充>

Context

  • Umi Version: umi@2.11.1
  • Node Version: v10.15.2
  • Platform: macOS Mojave 10.14.5
@sorrycc
Copy link
Member

sorrycc commented Nov 8, 2019

等补充完最小复现仓库再看。

@ycjcl868
Copy link
Contributor

关闭 dll 试试。 @Anonymity94

@sorrycc
Copy link
Member

sorrycc commented Nov 19, 2019

@Anonymity94 是有用到 umi-plugin-preload ?

@Anonymity94
Copy link
Author

@ycjcl868 感觉和这个没什么关系。
因为生产环境下没有开启dll,使用jenkins在生产环境下自动打包的时候也会出现这个问题。

@Anonymity94
Copy link
Author

@sorrycc 没有使用到umi-plugin-preload这个。

我今天下午看看能不能复现出来,复现出来的话我给提供个最小仓库地址~

@ycjcl868
Copy link
Contributor

watch

@Anonymity94
Copy link
Author

  1. 尝试一,失败😥
    获取 Ant Design Pro 最新分支代码,然后调整依赖的版本:
"umi": "^2.8.7",
"umi-plugin-react": "^1.9.5"
  1. 尝试二,失败😩
    获取公司产品代码,调整依赖的版本(同上),复现失败。

要不先这样吧,如果我再次发现这个问题,我debug下,再更新进展吧~

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants