NEXT craftinamerica.org. Base setup for headless wordpress https://www.craftinamerica.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 630B

1234567891011121314151617181920212223242526
  1. import Vue from 'vue'
  2. import VueRouter from 'vue-router'
  3. Vue.use(VueRouter)
  4. import App from '@/app.vue'
  5. import store from '@/store'
  6. import IndexPage from '@/pages/index.vue'
  7. import ListPage from '@/pages/list'
  8. const router = new VueRouter({
  9. mode: 'history',
  10. routes: [
  11. { path: '/', component: IndexPage },
  12. { path: '/lazy', component: () => import(/* webpackChunkName: "pages-lazy" */ './pages/lazy.vue') },
  13. {
  14. path: '/:type',
  15. component: ListPage,
  16. props: { sidebar: true }
  17. },
  18. ]
  19. })
  20. new Vue({ store, router, render: h => h(App) }).$mount('#wp-app')