Add initial app structure with Inertia.js integration
This commit is contained in:
21
resources/js/app.jsx
Normal file
21
resources/js/app.jsx
Normal 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",
|
||||
},
|
||||
});
|
||||
Reference in New Issue
Block a user