vue lazyload code example
Example 1: vue js lazy load component
const Foo = () => import('./Foo.vue')
const router = new VueRouter({
routes: [{ path: '/foo', component: Foo }]
})
Example 2: lazy image loading vue
$ npm i vue-lazyload -S
const Foo = () => import('./Foo.vue')
const router = new VueRouter({
routes: [{ path: '/foo', component: Foo }]
})
$ npm i vue-lazyload -S