How it works...

Now you obviously won't have such a big component in a real application, but you can easily see that if the Massive component represents all the other components of your app, they can quickly amount to such a big size.

The trick here is to load them asynchronously; Webpack will help you separate them into smaller bundles so that they will be loaded only if and when required.

Get Vue.js 2 Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.