2026-03-04 16:15:42 +00:00
|
|
|
import '../css/app.css'
|
|
|
|
|
|
|
|
|
|
import { createInertiaApp } from '@inertiajs/svelte'
|
|
|
|
|
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
|
|
|
|
|
import { mount, type Component } from 'svelte'
|
|
|
|
|
|
|
|
|
|
createInertiaApp({
|
|
|
|
|
resolve: (name: string) => resolvePageComponent(`./pages/${name}.svelte`, import.meta.glob('./pages/**/*.svelte')),
|
|
|
|
|
setup({ el, App, props }: { el: HTMLElement; App: Component; props: Record<string, unknown> }) {
|
|
|
|
|
mount(App, { target: el, props })
|
2026-03-04 19:45:01 +00:00
|
|
|
},
|
|
|
|
|
defaults: {
|
|
|
|
|
future: {
|
|
|
|
|
preserveEqualProps: true,
|
|
|
|
|
useDataInertiaHeadAttribute: true,
|
|
|
|
|
useDialogForErrorModal: true,
|
|
|
|
|
useScriptElementForInitialPage: true,
|
|
|
|
|
},
|
|
|
|
|
},
|
2026-03-04 16:15:42 +00:00
|
|
|
})
|