Parcel: how to make Code Splitting in vue-router?

Created on 13 Mar 2018  路  3Comments  路  Source: parcel-bundler/parcel

component: () => import('./views/HelloWorld')
not working

Question Vue

Most helpful comment

const Index = () => import('./components/Index.vue')
const Profile = () => import('./components/Profile.vue')


const routes = [
    {
        path: '/',
        component: Index
    },

    {
        path: '/profile',
        component: Profile
    }

]

All 3 comments

const Index = () => import('./components/Index.vue')
const Profile = () => import('./components/Profile.vue')


const routes = [
    {
        path: '/',
        component: Index
    },

    {
        path: '/profile',
        component: Profile
    }

]

Should work, gonna close this.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dsky1990 picture dsky1990  路  3Comments

davidnagli picture davidnagli  路  3Comments

philipodev picture philipodev  路  3Comments

humphd picture humphd  路  3Comments

mnn picture mnn  路  3Comments