mirror of
https://github.com/solidtime-io/solidtime.git
synced 2026-08-08 16:22:16 +01:00
35 lines
1.0 KiB
TypeScript
35 lines
1.0 KiB
TypeScript
import './bootstrap';
|
|
import '../css/app.css';
|
|
import type { DefineComponent } from 'vue';
|
|
import { createApp, h } from 'vue';
|
|
import { createInertiaApp } from '@inertiajs/vue3';
|
|
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
|
import { ZiggyVue } from '../../vendor/tightenco/ziggy';
|
|
import { createPinia } from 'pinia';
|
|
|
|
const appName = import.meta.env.VITE_APP_NAME || 'Laravel';
|
|
const pinia = createPinia();
|
|
|
|
createInertiaApp({
|
|
title: (title) => `${title} - ${appName}`,
|
|
resolve: (name) =>
|
|
resolvePageComponent(
|
|
`./Pages/${name}.vue`,
|
|
import.meta.glob<DefineComponent>('./Pages/**/*.vue')
|
|
),
|
|
setup({ el, App, props, plugin }) {
|
|
const app = createApp({ render: () => h(App, props) });
|
|
|
|
// currently only one vue app setup hook is supported
|
|
if (window.vueAppSetupHook) {
|
|
window.vueAppSetupHook(app);
|
|
}
|
|
|
|
app.use(plugin).use(pinia).use(ZiggyVue).mount(el);
|
|
},
|
|
|
|
progress: {
|
|
color: '#4B5563',
|
|
},
|
|
});
|