Skip to content

Instantly share code, notes, and snippets.

@zorca
Last active March 23, 2021 16:36
Show Gist options
  • Save zorca/a3cd191a25ca04efc9386e30fb40a20e to your computer and use it in GitHub Desktop.
Save zorca/a3cd191a25ca04efc9386e30fb40a20e to your computer and use it in GitHub Desktop.
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