How to use with Vue 2?
Hey,
I've tried making this work with Vue 2 using the following code as per the Inertia documentation:
import Vue from 'vue'
import { createInertiaApp } from '@inertiajs/inertia-vue'
createInertiaApp({
resolve: name => require(`./Pages/${name}`),
setup({ el, App, props }) {
new Vue({
render: h => h(App, props),
}).$mount(el)
},
})
But I'm seeing the following console error:
Uncaught (in promise) Error: Cannot find module './undefined'
I'm assuming this could be an issue where the statamic/inertia adapter isn't communicating the path for the components?
Thanks!
I'm also seeing this error when I try and follow the docs for Vue 3 - so I don't think it's related to Vue
Are your views inside of a resources/js/Pages directory?
@hotmeteor Yes, my collection is called Pages and my Blueprint is called Homepage
I've tried resources/js/Pages/Homepage.vue & resources/js/Pages/Pages/Homepage.vue and both return the above error
Hm. Can you share your app.js and Homepage.vue files?