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

🧐[问题 | question]线上部署完成后,页面不刷新的情况下点击路由跳转,会报loading chunk 6046 failed #11045

Closed
wh940816 opened this issue Nov 17, 2023 · 2 comments

Comments

@wh940816
Copy link

🧐 问题描述 | Problem description

使用了antd pro开发项目,线上部署完成后,页面不刷新的情况下点击路由跳转,会报loading chunk 6046 failed,怀疑是部署完成后,静态资源的hash值改变了,但是前端没有刷新,请求的还是旧的资源,强刷页面后就恢复正常了。

像这种错误除了不走缓存,可不可以捕获这个错误,然后自动刷新一下页面? 如果可以捕获,该如何捕获?

chrome 119.0

@chenshuai2144
Copy link
Collaborator

修改下nginx 的缓存,给每个文件搞个hash。顺便关掉 index.html 的缓存就能解决这个问题

@taofeifanIT
Copy link

nginx配置不是很懂,有改的位置截图吗

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

3 participants