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

使用history的warning #2115

Closed
smancang opened this issue May 29, 2019 · 4 comments
Closed

使用history的warning #2115

smancang opened this issue May 29, 2019 · 4 comments

Comments

@smancang
Copy link

What happens?

dva中有使用require("history/createHashHistory")这样的语句,history的版本中以后不打算支持这种方式,控制台会提示:
“Warning: Please use require("history").createHashHistory instead of require("history/createHashHistory"). Support for the latter will be removed in the next major release.”

建议将所有这种方法使用的地方改为 warning建议的方式

最小可复现仓库

请使用 yarn create umi 创建,选择 app,然后选上 dva,并上传到你的 GitHub 仓库

复现步骤,错误日志以及相关配置

相关环境信息

  • Umi 版本
  • Node 版本
  • 操作系统
@sorrycc
Copy link
Member

sorrycc commented May 29, 2019

这是 history 给的警告信息,请根据提示操作。

@DiamondYuan
Copy link
Contributor

这是 history 给的警告信息,请根据提示操作。

是 dva 最新的非 beta 版本的报错。

@sorrycc
Copy link
Member

sorrycc commented May 30, 2019

history 更新后给的警告,dva 是否 beta 版都一样。

@sorrycc sorrycc closed this as completed May 30, 2019
@Yakima-Teng
Copy link

这个到现在还有。。。dva的源码不方便按这个提示修改下吗?我们手动到node_modules里找dva/index文件去修改,重新装依赖,改动又会丢失的。

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

4 participants