Soon, you will build huge Vue websites with loads of components. Loading a lot of JavaScript may generate wasteful and useless upfront delay. In the Loading your components asynchronously recipe in Chapter 4, All About Components, we already saw a hint of how to retrieve our components remotely. Here we will apply a similar technique to components loaded by a route in vue-router.
Dynamically loading pages in your vue-router
Getting ready
This recipe requires knowledge of vue-router. If you want, you can go through Loading your components asynchronously in Chapter 4, All About Components, to get a better idea of what is happening.