vue-cli3.x 初始typescript+pwd项目 npm run serve 提示懒加载about.vue组件报错,但如果是常规引入又不会export default new Router({mode: 'history',base: process.env.BASE_URL,routes: [{ path: '/',
name: 'home',
component: Home
},
{ path: '/about',
name: 'about',
// route level code-splitting
// this generates a separate chunk (about.[hash].js) for this route
// which is lazy-loaded when the route is visited.
component: () => import(/* webpackChunkName: "about" */ './views/About.vue')
}]})
添加回答
举报
0/150
提交
取消