Problem with Inertia.js SSR not rendering server-side in Laravel 12 with React

I’m experiencing issues with Server-Side Rendering (SSR) in a fresh Laravel 12 installation using the React starter kit. Despite following the documentation, the page continues to render client-side (CSR) instead of server-side.

Setup:

  • Laravel 12 (fresh installation)
  • Inertia.js with React starter kit
  • Node.js 22
  • Running composer dev:ssr (Vite SSR server starts on port 13714)

Problem:

  • SSR build completes without errors (resources/js/ssr.tsx)
  • Inertia SSR server runs on port 13714
  • Browser still shows CSR behavior (no server-rendered markup)

Same issue occurs in production with:

  • PM2 running php artisan inertia:start-ssr (tried also “node bootstrap/ssr/ssr.js”)

Server should return fully rendered HTML on initial page load.

How can I debug why SSR isn’t taking effect? Are there additional configuration steps I might be missing for Laravel 12?