mirror of
https://github.com/coollabsio/coolify.git
synced 2026-03-11 08:55:47 +00:00
chore(ui): add inertia app entry point
This commit is contained in:
parent
612219efa9
commit
053628e2bf
3 changed files with 24 additions and 16 deletions
|
|
@ -0,0 +1,12 @@
|
|||
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 })
|
||||
}
|
||||
})
|
||||
|
|
@ -1,16 +1,12 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
<meta name="robots" content="noindex">
|
||||
<title>Coolify</title>
|
||||
@vite('resources/css/app.css')
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1 class="text-3xl font-bold">Simple Heading</h1>
|
||||
</body>
|
||||
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="robots" content="noindex">
|
||||
@vite('resources/js/app.ts')
|
||||
@inertiaHead
|
||||
</head>
|
||||
<body>
|
||||
@inertia
|
||||
</body>
|
||||
</html>
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ import tailwindcss from '@tailwindcss/vite';
|
|||
export default defineConfig({
|
||||
plugins: [
|
||||
laravel({
|
||||
input: ['resources/js/app.js', 'resources/css/app.css'],
|
||||
input: ['resources/js/app.ts'],
|
||||
refresh: true,
|
||||
}),
|
||||
svelte({
|
||||
|
|
|
|||
Loading…
Reference in a new issue