Add initial app structure with Inertia.js integration

This commit is contained in:
2026-03-17 19:11:37 +07:00
parent 1dd800bcee
commit 1aff175819
2 changed files with 35 additions and 0 deletions

21
resources/js/app.jsx Normal file
View File

@@ -0,0 +1,21 @@
import "./bootstrap";
import "../css/app.css";
import { createRoot } from "react-dom/client";
import { createInertiaApp } from "@inertiajs/react";
import { resolvePageComponent } from "laravel-vite-plugin/inertia-helpers";
createInertiaApp({
title: (title) => `${title} - Perpustakaanku`,
resolve: (name) =>
resolvePageComponent(
`./Pages/${name}.jsx`,
import.meta.glob("./Pages/**/*.jsx"),
),
setup({ el, App, props }) {
const root = createRoot(el);
root.render(<App {...props} />);
},
progress: {
color: "#4F46E5",
},
});