YUNOVA · Vue.js · Module 12: Architecture and performance
Lazy loading routes and code splitting in Vue
Lazy loading routes and code splitting in Vue
Key points
- Use component: () => import('./Page.vue') to lazy load a route.
- The bundler splits each lazy route into its own file.
- Users download a page's code only when they visit it.