[Vuejs]-Vue-Router is not supporting dynamic import() function

0👍

Dynamic imports are enabled by proper babel configurations. You have to properly configure babel. See here.

-1👍

import LandingComp = () => { 
    import landing from 'pages/landing/landing'
    Vue.component('search-product', landing)
}

const Router = new VueRouter({
    routes: [
        { path: '', component: LandingComp }
    ]
})

you can try it

Leave a comment