From 27272fb7d271d2be2169b77c676d67a3fbc8695c Mon Sep 17 00:00:00 2001 From: Jonathan Reinink Date: Tue, 22 Dec 2020 11:49:31 -0500 Subject: [PATCH] Update app.js to use new Inertia exports --- resources/js/app.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/js/app.js b/resources/js/app.js index 936a857..a223ed4 100644 --- a/resources/js/app.js +++ b/resources/js/app.js @@ -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)