Skip to content

SSR Implementation#21

Open
MattPurland wants to merge 2 commits intoboxybird:masterfrom
MattPurland:master
Open

SSR Implementation#21
MattPurland wants to merge 2 commits intoboxybird:masterfrom
MattPurland:master

Conversation

@MattPurland
Copy link

I'll caveat this PR with the excuse that I've not developed a WordPress site in a while (over 3 years) and I wanted to use Inertia as that's what I currently use with Laravel. Awesome work on this by the way!

With the release of Inertia.js 1.0 I wanted SSR support with Svelte, so here we are.

It's not perfect as it can't apply a different id or the classes to the div, as the div is rendered by the SSR server. But it works well enough for me.

I've also updated your WordPress starter theme to use Vite (as per the Laravel and Inertia docs):
https://github.com/MattPurland/inertia-vite-svelte-ssr-wordpress-theme

@MattPurland MattPurland mentioned this pull request Feb 13, 2023
@ElvisCaballero
Copy link

Hello @MattPurland !
Great work!

Would it make sense to add ability to change SSR server host, as inside of docker container current host doesn't work.
Also maybe option to change SSR entry point folder?

Cheers!

@WRCarlile
Copy link

Thanks @MattPurland ! I am testing this out and would love to use this in production.

I was curious what you meant by "can't apply a different id or the classes to the div"?

I am new to inertia and am trying to wrap my head around SSR implementation. Would it make sense to have a button within the plugin that turns SSR on/off? Does your version take a hit on performance vs the current version?

I would love to start using inertia for wordpress as its such a pain to build SPA's that need multiple repos etc. But i feel SEO is very important for most wordpress sites.

@WRCarlile
Copy link

@MattPurland I just realized I will need to use your svelte theme as well, so no need for a button since the plugin is looking for the ssr file with your PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants