April 2017
Intermediate to advanced
454 pages
12h 51m
English
Create a new project with vue-cli by making a new directory and running the following command:
vue init webpack
You can answer the question as you prefer, as long as you add the vue-router to the template when asked.
We will create two components: one will be our home page and it will be small and light, the other component will be very big and very slow to load. What we want to achieve is to load the home page immediately, without having to wait for the huge component to be downloaded by the browser.
Open the Hello.vue file in the components folder. Delete everything and only leave the following:
<template> <div> Lightweight hello </div></template>
In the same folder, create another file named Massive.vue and write the ...
Read now
Unlock full access