You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
22 lines
718 B
JavaScript
22 lines
718 B
JavaScript
import './bootstrap';
|
|
import '../css/app.css';
|
|
|
|
import { createRoot } from 'react-dom/client';
|
|
import { createInertiaApp } from '@inertiajs/inertia-react';
|
|
import { InertiaProgress } from '@inertiajs/progress';
|
|
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers';
|
|
|
|
const appName = window.document.getElementsByTagName('title')[0]?.innerText || 'Laravel';
|
|
|
|
createInertiaApp({
|
|
title: (title) => `${title} - ${appName}`,
|
|
resolve: (name) => resolvePageComponent(`./Pages/${name}.jsx`, import.meta.glob('./Pages/**/*.jsx')),
|
|
setup({ el, App, props }) {
|
|
const root = createRoot(el);
|
|
|
|
root.render(<App {...props} />);
|
|
},
|
|
});
|
|
|
|
InertiaProgress.init({ color: '#4B5563' });
|