{
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')
}
can work if modify following.
{
path: '/about',
name: 'About',
component: About
}
Vue Router https://v3.router.vuejs.org/guide/advanced/lazy-loading.html#lazy-loading-routes
following code doesn't work.
can work if modify following.