inertiajs / inertia-laravel

The Laravel adapter for Inertia.js.
https://inertiajs.com
MIT License
2.08k stars 234 forks source link

SSR Not Rendering Content After Changing Default Port #647

Closed DevShaded closed 3 months ago

DevShaded commented 3 months ago

I recently attempted to change the SSR port in the ssr.js file from the default 13714 to 13715. However, after making this change, the server-rendered content is not appearing in the browser source code.

Steps to Reproduce

  1. Changed the port in ssr.js from 13714 to 13715.
  2. Ran the command php artisan inertia:start-ssr.
  3. Observed the source code in the browser, which shows no server-rendered content.

Expected Behavior

The server-rendered content should appear in the browser source code, similar to when the default port 13714 is used.

Actual Behavior

No server-rendered content is visible in the browser source code after changing the port.

Additional Information

Output Comparison

RobertBoes commented 3 months ago

Did you also update the config so Inertia can grab the SSR content from the correct place? See https://github.com/inertiajs/inertia-laravel/blob/1.x/config/inertia.php#L26

DevShaded commented 3 months ago

Thanks for the reply! No, I haven't changed the config. I'll try to do that, and see if that has any changes

DevShaded commented 3 months ago

This fixed the issue with the SSR rendering. Maybe it should state in the docs how to change the ssr ports... Anyways, thanks for the help.