using vue cli, you can bundle vue route chunk together using web-pack
const routes: Array<RouteRecordRaw> = [
{ path: '/', name: 'Home', component: Home },
{
path: '/login',
name: 'Login',
meta: { alreadyAuth: true },
component: () => import(/* webpackChunkName: "login" */ '../views/public/Login.vue')
},
{ path: '/splash', name: 'Splah', component: Splash },
{
path: '/portal',
name: 'Portal',
meta: { requireAuth: true },
component: () => import(/* webpackChunkName: "portal" */ '../layouts/Dashboard.vue'),
children: [
{ path: '', component: () => import(/* webpackChunkName: "portal" */ '../views/portal/Portal.vue') }
]
}
]
I'm current using Vite for a project. Is there a way to bundle the chunk for example Dashboard and Portal together?
running nom run build will generate individual chunk file for Portal.js and Dashboard.js
Thanks