woutdp / live_svelte

Svelte inside Phoenix LiveView with seamless end-to-end reactivity
https://hexdocs.pm/live_svelte
MIT License
1.01k stars 37 forks source link

Implement SSR behaviour #82

Closed voughtdq closed 9 months ago

voughtdq commented 9 months ago

To facilitate the creation of alternative SSR behaviours, the the implementation-specific code is relocated into its own module. This is backwards compatible, but will emit a deprecation warning. There are also some basic tests to verify that we default to NodeJS for backwards compatibility.

I've also started working on a subproject to do end-to-end testing, but would like to iron out any concerns here before moving on to that.

Partially addresses what was discussed in #81

woutdp commented 9 months ago

Thank you for the great work!

What still is missing is automatic setup for when you run mix live_svelte.setup and the example_project should still be adjusted I believe. Feel free to do these changes too, if not I'll tackle them myself :)

voughtdq commented 9 months ago

Sounds good, I'll work on that today.

voughtdq commented 9 months ago

@woutdp can you look over the changes? I'm getting close to finishing up a first attempt at trying creating an alternative Node JS implementation and these changes would be useful for testing.

woutdp commented 9 months ago

@voughtdq done, thank you for the great work!