Update app.js to use new Inertia exports

This commit is contained in:
Jonathan Reinink 2020-12-22 11:49:31 -05:00
parent 9b2b7d74ef
commit 27272fb7d2
1 changed files with 6 additions and 6 deletions

12
resources/js/app.js vendored
View File

@ -1,27 +1,27 @@
import Vue from 'vue'
import VueMeta from 'vue-meta'
import PortalVue from 'portal-vue'
import { InertiaApp } from '@inertiajs/inertia-vue'
import { App, plugin } from '@inertiajs/inertia-vue'
import { InertiaProgress } from '@inertiajs/progress/src'
Vue.config.productionTip = false
Vue.mixin({ methods: { route: window.route } })
Vue.use(InertiaApp)
Vue.use(plugin)
Vue.use(PortalVue)
Vue.use(VueMeta)
InertiaProgress.init()
let app = document.getElementById('app')
const el = document.getElementById('app')
new Vue({
metaInfo: {
titleTemplate: (title) => title ? `${title} - Ping CRM` : 'Ping CRM'
},
render: h => h(InertiaApp, {
render: h => h(App, {
props: {
initialPage: JSON.parse(app.dataset.page),
initialPage: JSON.parse(el.dataset.page),
resolveComponent: name => import(`@/Pages/${name}`).then(module => module.default),
},
}),
}).$mount(app)
}).$mount(el)