index.js
394 Bytes
import Vue from 'vue';
import VueRouter from 'vue-router';
Vue.use(VueRouter);
const routes = [
{
path: '/',
name: 'Home',
component: () => import('../views/home'),
},
{
path: '/search/:id',
component: () => import('../views/search'),
},
];
const router = new VueRouter({
mode: 'hash',
base: process.env.BASE_URL,
routes,
});
export default router;