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

properly encode server components #105

Closed drKreso closed 5 months ago

drKreso commented 5 months ago

This is a fix for behaviour described in https://github.com/woutdp/live_svelte/issues/103

Svelte is by default using unicode escape encoding for non ASCII. This gets garbled in LiveSvelte.SSR.NodeJS.render unless we send binary option to NodeJS.call!

I wish I saw this before I stumbled on solution :)

Screenshot 2024-01-11 at 11 25 04
woutdp commented 5 months ago

Great work!