Vue · Senior · Question 17 of 75
How do you reduce the initial bundle of a large Vue SPA?
- ✓Correct answer: Lazy-load routes and heavy components with dynamic
import(), and import only used parts of libraries - 2Register all components globally
- 3Disable the template compiler
Explanation
Route-level code splitting is the biggest win. Vue's APIs are tree-shakable, so unused features like <Transition> are not bundled unless imported.