vue项目报错Error: Cannot find module '@/views/sys/menu/index'

 

 

// 路由懒加载 (原来写法)
// export const loadView = (view) => {
//   return () => import(`@/views/${view}`)
// }

//新写法
export const loadView = (view) => {
  return (resolve) => require([`@/views/${view}`], resolve)
};

 

posted @ 2021-04-15 09:41  小白呀白菜  阅读(2352)  评论(0编辑  收藏  举报