CodeZettaInterview Hub

Vue.js · Routing · Mid-Level · Debugging

How do you lazy load routes?

Short Interview Answer

() => import('./Page.vue') as component—webpack/vite code splitting.

Detailed Explanation

Speeds initial load. Group related routes thoughtfully.

Example

{ path: '/admin', component: () => import('./Admin.vue') }

Did you know this answer?