@php $viteHotPath = public_path('hot'); $viteManifestPath = public_path('build/manifest.json'); $useVite = false; if (file_exists($viteHotPath)) { $hot = trim((string) file_get_contents($viteHotPath)); $useVite = $hot !== '' && ! str_contains($hot, '[::1]'); } elseif (file_exists($viteManifestPath)) { $manifest = json_decode(file_get_contents($viteManifestPath), true) ?: []; $css = $manifest['resources/css/app.css']['file'] ?? null; $js = $manifest['resources/js/spa/main.jsx']['file'] ?? null; $useVite = $css && $js && file_exists(public_path('build/'.$css)) && file_exists(public_path('build/'.$js)); } @endphp @if ($useVite) @vite(['resources/css/app.css', 'resources/js/spa/main.jsx']) @endif @if ($useVite)
@else

Frontend build missing

Run npm install and npm run build (or npm run dev) to generate the React frontend assets.

@endif