@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @viteReactRefresh @vite(['resources/css/app.css', 'resources/js/app.jsx']) @else @endif
@if (file_exists(public_path('build/manifest.json')) || file_exists(public_path('hot'))) @elseLaravel needs either a Vite production build or the Vite dev server before this page can load the app.
Option A — one-time build (good for local use with only php artisan serve):
cd {{ base_path() }} — use this full path; if you use sudo or root, ~/Desktop is not your user’s Desktop.apt install -y npm (Debian/Ubuntu; ships Node 18 — this project is pinned for that). For Node 20+, you can upgrade and use npm update later.npm installnpm run buildOption B — hot reload (two terminals):
php artisan servenpm run dev (creates public/hot while it runs)