44 lines
1.3 KiB
JavaScript
Vendored
44 lines
1.3 KiB
JavaScript
Vendored
import './bootstrap';
|
|
|
|
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
|
|
|
import { createApp, h } from 'vue';
|
|
import { createInertiaApp, Head, Link } from '@inertiajs/inertia-vue3';
|
|
|
|
import { library } from '@fortawesome/fontawesome-svg-core';
|
|
import { FontAwesomeIcon } from '@fortawesome/vue-fontawesome';
|
|
import { fas } from '@fortawesome/free-solid-svg-icons';
|
|
import { far } from '@fortawesome/free-regular-svg-icons';
|
|
import { fab } from '@fortawesome/free-brands-svg-icons';
|
|
|
|
library.add(fas)
|
|
.add(far)
|
|
.add(fab);
|
|
|
|
import './css/app.css';
|
|
import App from '@/Share/Layout/App.vue';
|
|
|
|
createInertiaApp({
|
|
resolve: async (name) => {
|
|
const page = resolvePageComponent(
|
|
`./Pages/${name}.vue`,
|
|
import.meta.glob('./Pages/**/*.vue'),
|
|
);
|
|
|
|
page.then((module) => {
|
|
module.default.layout = module.default.layout || App
|
|
});
|
|
|
|
return page;
|
|
},
|
|
setup({el, App, props, plugin}) {
|
|
createApp({render: () => h(App, props)})
|
|
.use(plugin)
|
|
.component('InertiaLink', Link)
|
|
.component('InertiaHead', Head)
|
|
.component('FontAwesomeIcon', FontAwesomeIcon)
|
|
.mount(el)
|
|
},
|
|
title: title => `${title} | KamilCraft API`
|
|
});
|