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

## umi dev 之后页面一直在不停地刷新怎么办? #1863

Closed
sciice opened this issue Jan 17, 2019 · 1 comment
Closed

## umi dev 之后页面一直在不停地刷新怎么办? #1863

sciice opened this issue Jan 17, 2019 · 1 comment

Comments

@sciice
Copy link

sciice commented Jan 17, 2019

umi dev 之后页面一直在不停地刷新怎么办?

这是因为 html 和 umi.js 的端口不一致。

比如:

  • html 在 7001 端口
  • umi.js 在 8000 端口

然后你访问 html,并且在 html 里引用了 8000 端口的 umi.js,这样会导致 socket server 连接出错,触发了循环刷新问题。

解决

配置 SOCKET_SERVER 到 umi dev 所在端口,比如 SOCKET_SERVER=8000 umi dev。(windows 下是 set SOCKET_SERVER=8000&&umi dev`)

Originally posted by @sorrycc in #1421 (comment)

@sciice sciice closed this as completed Jan 17, 2019
@xiekw2010
Copy link
Contributor

新版本直接设置 port 不行了。应该这么设置 SOCKET_SERVER=http://localhost:8000 umi dev

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