Code Splitting With Vue.js And Webpack

Code Splitting With Vue.js And Webpack

One possible downside to bundling your single page app with Webpack is that you can end up with a really big bundle file, sometimes several megabytes in size!

[…]

Note: this article was originally posted here on the Vue.js Developers blog on 2017/07/03

[…]

How could we get our Vue.js app to load this? You may be tempted to try something like this:

[…]

The most obvious way is by page. For example, say you have two pages in your app, a home page and an about page. These pages can be wrapped inside components Home.vue and About.vue and these can be the split points of the app.

[…]