-
Notifications
You must be signed in to change notification settings - Fork 2k
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
vue-router.esm.js?8c4f:2079 ChunkLoadError: Loading chunk 66 failed. #2258
Comments
我也是用的vue-admin-template模版,出现了这个问题 |
你解决了吗 |
我项目中出现这个bug是因为我在基座中注册了子应用的路由。目前我就是用location.href进行跳转,后续会把基座中子应用的路由拆解出来。
|
最新发现,子应用需要在unmount的时候手动把router = null, @gongshun 给出的链接里面有demo |
问题解决了,十分感谢 |
|
仍然没有解决,大佬能否说下问题的核心 |
看我上面的回复 |
复现步骤,错误日志以及相关配置
主应用域名localhost:3000
子应用域名localhost:3001
主子应用均采用vue-admin-template构建项目,会同时加载路由与菜单,路由是动态路由从服务器获取。
主应用有两个按钮: 父按钮、子按钮 。点击子按钮跳到子应用后,再点击主应用上面的父按钮跳回父应用(用的是this.$router.push())报如下错误
但是使用location.href可以跳转成功
报错信息:
vue-router.esm.js?8c4f:2079 ChunkLoadError: Loading chunk 66 failed.
(missing: http://localhost:3001/js/66.js)
at Function.requireEnsure [as e] (app.js:952)
at fn.e (app.js:187)
at Array.map ()
at webpackAsyncContext (eval at ./src lazy recursive ^./.*.vue$ (app.js:1), :2378:34)
at webpack_exports.default (lazyLoading.js?82d3:1)
at eval (vue-router.esm.js?8c4f:1903)
at eval (vue-router.esm.js?8c4f:1930)
at Array.map ()
at eval (vue-router.esm.js?8c4f:1930)
at Array.map ()
相关环境信息
The text was updated successfully, but these errors were encountered: