2019-03-18 08:53:00 -03:00
|
|
|
import Inertia from 'inertia-vue'
|
|
|
|
import PortalVue from 'portal-vue'
|
|
|
|
import Vue from 'vue'
|
|
|
|
|
|
|
|
Vue.config.productionTip = false
|
2019-04-15 20:38:57 -03:00
|
|
|
Vue.mixin({ methods: { route: (...args) => window.route(...args).url() } })
|
2019-03-18 08:53:00 -03:00
|
|
|
Vue.use(PortalVue)
|
|
|
|
|
|
|
|
let app = document.getElementById('app')
|
|
|
|
|
|
|
|
new Vue({
|
|
|
|
render: h => h(Inertia, {
|
|
|
|
props: {
|
|
|
|
component: app.dataset.component,
|
|
|
|
props: JSON.parse(app.dataset.props),
|
|
|
|
resolveComponent: (component) => {
|
|
|
|
return import(`@/Pages/${component}`).then(module => module.default)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
}).$mount(app)
|