Last active
March 23, 2021 16:36
-
-
Save zorca/a3cd191a25ca04efc9386e30fb40a20e to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require("./bootstrap"); | |
// Import modules... | |
import Vue from "vue"; | |
import { | |
App as InertiaApp, | |
plugin as InertiaPlugin | |
} from "@inertiajs/inertia-vue"; | |
import { InertiaProgress } from "@inertiajs/progress"; | |
Vue.use(InertiaPlugin); | |
InertiaProgress.init(); | |
const app = document.getElementById("app"); | |
new Vue({ | |
render: h => | |
h(InertiaApp, { | |
props: { | |
initialPage: JSON.parse(app.dataset.page), | |
resolveComponent: component => { | |
return require(`./views/${component}.vue`).default; | |
} | |
} | |
}) | |
}).$mount(app); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment