import Vue from "vue"; import VueRouter from "vue-router"; Vue.use(VueRouter); const originalPush = VueRouter.prototype.push; VueRouter.prototype.push = function push(location) { return originalPush.call(this, location).catch((err) => err); }; const routes = [ { path: "/", name: "home", component: () => import(/* webpackChunkName: "index" */ "../views/layout/index.vue"), redirect: "/login", children: [ { path: "/login", name: "login", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import(/* webpackChunkName: "login" */ "../views/mobile/Login.vue"), }, { path: "/signup", name: "Signup", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import(/* webpackChunkName: "singup" */ "../views/mobile/Signup.vue"), }, { path: "/recommend", name: "Recommend", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import( /* webpackChunkName: "recommend" */ "../views/mobile/Recommend.vue" ), }, { path: "/success", name: "Success", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import( /* webpackChunkName: "success" */ "../views/mobile/Success.vue" ), }, { path: "/rankinglist", name: "RankingList", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import( /* webpackChunkName: "rankinglist" */ "../views/mobile/RankingList.vue" ), }, { path: "/listdetails", name: "ListDetails", meta: { title: "CEBG 1,000 Commander Rally" }, component: () => import( /* webpackChunkName: "listdetails" */ "../views/mobile/ListDetails.vue" ), }, ], }, ]; const router = new VueRouter({ mode: "history", base: process.env.BASE_URL, routes, }); export default router;