mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
chore(setup): simplify inertia app entry point
This commit is contained in:
parent
9920975107
commit
468542babd
1 changed files with 5 additions and 17 deletions
|
|
@ -1,20 +1,8 @@
|
|||
import '../css/app.css'
|
||||
import "../css/app.css";
|
||||
|
||||
import { createInertiaApp } from '@inertiajs/svelte'
|
||||
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
|
||||
import { mount, type Component } from 'svelte'
|
||||
import { createInertiaApp } from "@inertiajs/svelte";
|
||||
import Layout from "./layouts/Layout.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 })
|
||||
},
|
||||
defaults: {
|
||||
future: {
|
||||
preserveEqualProps: true,
|
||||
useDataInertiaHeadAttribute: true,
|
||||
useDialogForErrorModal: true,
|
||||
useScriptElementForInitialPage: true,
|
||||
},
|
||||
},
|
||||
})
|
||||
layout: () => Layout,
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue