Skip to content

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

@Dommmin

Description

@Dommmin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions