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

vite 开启https后 在移动端浏览器 页面会一直刷新 #6911

Closed
7 tasks done
Xyuan-abs opened this issue Feb 14, 2022 · 5 comments
Closed
7 tasks done

vite 开启https后 在移动端浏览器 页面会一直刷新 #6911

Xyuan-abs opened this issue Feb 14, 2022 · 5 comments
Labels
duplicate This issue or pull request already exists

Comments

@Xyuan-abs
Copy link

Xyuan-abs commented Feb 14, 2022

Describe the bug

vite 开启https后 在ios14.7.1浏览器打开 页面会一直刷新
重现步骤:
yarn create vite
yarn install
vite.config.js 添加server:{https:true} 开启https
yarn dev --host
在手机浏览器打开项目地址

VIDEO_20220214_173429651.mp4

Reproduction

这个问题不好在线重现 建议用yarn直接新建一个项目来复现

System Info

System:
iPhone11 ,ios14.7.1
    OS: Windows 10 10.0.19044
    CPU: (12) x64 11th Gen Intel(R) Core(TM) i5-11400F @ 2.60GHz
    Memory: 6.37 GB / 15.80 GB
  Binaries:
    Node: 14.17.5 - D:\Program Files\nodejs\node.EXE
    Yarn: 1.22.11 - ~\AppData\Roaming\npm\yarn.CMD
    npm: 6.14.14 - D:\Program Files\nodejs\npm.CMD
  Browsers:
    Edge: Spartan (44.19041.1266.0), Chromium (98.0.1108.50)
    Internet Explorer: 11.0.19041.1202
  npmPackages:
    @vitejs/plugin-vue: ^2.2.0 => 2.2.0
    vite: ^2.8.0 => 2.8.1

Used Package Manager

yarn

Logs

没有错误日志

Validations

@sweethuan
Copy link

试一下加个配置
server: {
hmr: {
port: 80
}
}

@Xyuan-abs
Copy link
Author

Xyuan-abs commented Feb 15, 2022

试一下加个配置 server: { hmr: { port: 80 } }

加了之后可以了

但是 加了之后

pc端就会一直刷新,不过频率没有那么快

@sweethuan
Copy link

试一下加个配置 server: { hmr: { port: 80 } }

加了之后可以了

但是 加了之后

pc端就会一直刷新,不过频率没有那么快

pc端时就注释掉这段配置

@Xyuan-abs
Copy link
Author

试一下加个配置 server: { hmr: { port: 80 } }

刚才发现 配置之后,ios还是会刷新,只不过会等久一点 大概间隔1,2分钟会刷新一次

@sapphi-red
Copy link
Member

Duplicate of #2337.

@sapphi-red sapphi-red added duplicate This issue or pull request already exists and removed pending triage labels May 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators May 20, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants