I am considering using VueJS for a multi-page website. In the official routing example, they show that you can dynamically change the template and component based on the URL, but they still have all the HTML templates and JS components in a single file that loads immediately.
My site will be quite large, and I want to download everything only as needed. So my question is: How can I asynchronously load these HTML templates and JS components on demand when changing the URL? It would be useful to simply show how the above routing example can be modified for dynamic script loading.
source share