app.js
require('./bootstrap');

window.Vue = require('vue');
import VueRouter from 'vue-router'
import Example from './components/ExampleComponent'
import Post from './components/PostComponent'

Vue.component('example-component', require('./components/ExampleComponent.vue').default);
Vue.component('post-component', require('./components/PostComponent.vue').default);
const routes = [
  { 
      path: '/posts',
      component: Post,
      
  },
  { 
      path: '/',
      component: Example,
      
  },
]
const router = new VueRouter({
  routes // short for `routes: routes`
})

const app = new Vue({
  router
}).$mount('#app')