本文主要是介绍若依前后分离 Error: Cannot find module ‘@/views/system/user/index‘ at webpackEmptyContext (index.js:39,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
问题: 若依分离版下前端路由切换不了
在 /src/store/modules/permission.js
把 return () => import(@/views/${view}
) 改成下面内容
export const loadView = (view) => { // 路由懒加载return (resolve) => require([`@/views/${view}`], resolve)
}
这篇关于若依前后分离 Error: Cannot find module ‘@/views/system/user/index‘ at webpackEmptyContext (index.js:39的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!