import childRoutes from '@/router/child-routes' const routes: Array = [ { path: '/', name: 'Home', component: () => import('@/views/index.vue') }, { path: '/search', name: 'Search', component: () => import('@/views/search.vue') }, ...childRoutes, { path: '/:pathMatch(.*)', name: '404', component: () => import('@/components/404.vue') } ] export default routes