27 lines
830 B
JavaScript
27 lines
830 B
JavaScript
require("./bootstrap");
|
|
|
|
import { createApp, h } from "vue";
|
|
import { createInertiaApp } from "@inertiajs/inertia-vue3";
|
|
import { InertiaProgress } from "@inertiajs/progress";
|
|
import Notifications from "notiwind";
|
|
|
|
const appName = window.document.getElementsByTagName("title")[0]?.innerText || "Laravel";
|
|
|
|
window.genUid = function () {
|
|
return [...Array(16)].map(() => Math.floor(Math.random() * 16).toString(16)).join("");
|
|
};
|
|
|
|
createInertiaApp({
|
|
title: (title) => `${title} - ${appName}`,
|
|
resolve: (name) => require(`./Pages/${name}.vue`),
|
|
setup({ el, app, props, plugin }) {
|
|
return createApp({ render: () => h(app, props) })
|
|
.use(plugin)
|
|
.use(Notifications)
|
|
.mixin({ methods: { route } })
|
|
.mount(el);
|
|
},
|
|
});
|
|
|
|
InertiaProgress.init({ color: "#4b5563" });
|