i have project developed with vue cli working fine in dev mode. but when i build it. everything goes fine without the components loaded by routes ('/', component). whats wrong in my code
import Vue from 'vue'
import App from './App'
import router from './router/index'
Vue.config.productionTip = false
new Vue({
router,
template: '<App/>',
components: { App }
}).$mount('#app')
and
import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home.vue'
import List from '@/components/List.vue'
const router = new Router({
mode: 'history',
routes: [
{
path: '/',
component: Home
},
{
path: '/buy-n-sell/:category',
component: List,
children: [
{
path: '',
component: catLists
},
{
path: 'location/:city',
component: cityLists,
name: 'citypostList'
},
{
path: 'subcategory/:subcat',
component: subcatList,
name: 'subcatpostList'
},
{
path: 'subcategory/:subcat/:city',
component: subcatCityList,
name: 'subcatecityList'
}
]
}
]
})
export default router