
vue-router
喵喵虫
前端开发
展开
-
vue3动态路由懒加载Error: Cannot find module ‘@/views/xxx‘ at webpackEmptyContext
项目场景:最近在使用vue3+elementPlus做后台管理的权限管理,在动态添加路由懒加载出现问题问题描述:export const loadView = view => { // 路由懒加载 return () => import(`@/views/${view}`); // 报错 // return () => require(`@/views/${view}`); // 报错 // return resolve => requi原创 2021-07-28 08:54:06 · 2349 阅读 · 2 评论 -
vue3出现Component “default“ in record with path “xxx“ is a function that does not return aPromise.
项目场景:Component "default" in record with path "/build-detail" is a function that does not return a Promise. If you were passing a functional component, make sure to add a "displayName" to the component. This will break in production if not fixed.问题描述:单原创 2021-07-07 10:37:51 · 8354 阅读 · 1 评论