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

在safari中,cmd r刷新页面,会出现错误的页面 #2190

Closed
arthasshi opened this issue Aug 14, 2018 · 2 comments
Closed

在safari中,cmd r刷新页面,会出现错误的页面 #2190

arthasshi opened this issue Aug 14, 2018 · 2 comments

Comments

@arthasshi
Copy link

Version

3.0.0-rc.3

Node and OS info

Node 8.11.3 / npm 5.6.0/ macOS 10.13.6

Steps to reproduce

1.运行项目,在A页面中存在组件a,b,c;
2.修改项目,删除A页面中的组件a,保存,浏览器正常响应,页面中组件a消失;
3.cmd r,刷新浏览器,页面中组件a再次出现!

What is expected?

预期结果为,强制刷新浏览器,组件a也不应该出现,页面显示内容对应当前代码

What is actually happening?

实际上,强制刷新之后,页面和代码不对应,产生了错误的页面

@haoqunjiang
Copy link
Member

请更新至最新的 3.0.0,如果还有问题的话请提供必要的复现代码。

此外,Safari 中 Cmd + R 刷新不能保证没有缓存,需要先 Cmd + Option + E 清空缓存或者在 Network 面板中勾选 Ignore the resource cache when loading resources。

@arthasshi
Copy link
Author

根据:Bug with Safari #1132
解决了
在vue.cofing.js中添加输出文件的hash规则,
module.exports = {
chainWebpack: config => {
if (process.env.NODE_ENV === 'development') {
config
.output
.filename('[name].[hash].js')
.end()
}
}
}
感谢@Twinpix

 

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