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

UMI3顶层用了rudex封装 #4205

Closed
ithack opened this issue Mar 18, 2020 · 4 comments
Closed

UMI3顶层用了rudex封装 #4205

ithack opened this issue Mar 18, 2020 · 4 comments

Comments

@ithack
Copy link

ithack commented Mar 18, 2020

image
image

Context

  • Umi Version: 3.0.7
  • Node Version: 12.11.0
  • Platform: Mac
@sorrycc
Copy link
Member

sorrycc commented Mar 18, 2020

Umi 没有内置 redux,应该是开了啥插件吧。问题是啥?这个 Provider 哪来的吗?应该是 plugin-initial-state 加的。

@ithack
Copy link
Author

ithack commented Mar 19, 2020

x,应该是开了啥插件吧。问题是啥?这个 Provider 哪来的吗

我并没有用dva和plugin-initial-state这个插件,为了代码的可阅读性,不知有没有办法关掉外层的Provider

@sorrycc
Copy link
Member

sorrycc commented Mar 19, 2020

你应该是配了 preset-react,可能由于某些原因 plugin-initial-state 被无开启了,可配置 initialState: false 关闭试试。

@ithack
Copy link
Author

ithack commented Mar 19, 2020

你应该是配了 preset-react,可能由于某些原因 plugin-initial-state 被无开启了,可配置 initialState: false 关闭试试。

谢谢,已经找到查找关闭插件相关方法非常实用分享一下:
首先用 umi plugin list --key 查找安装(包裹默认安装)的插件和相应的key,然后在.umirc.ts里通过key配置相关插件;如下:

……
initialState: false,
dva: false,
model: false,
……
如上关闭不想用的插件

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

No branches or pull requests

2 participants