frandiox / vite-ssr

Use Vite for server side rendering in Node
MIT License
829 stars 92 forks source link

fix: Leaner state serialization to JSON #108

Closed dchenk closed 3 years ago

dchenk commented 3 years ago

Fixes https://github.com/frandiox/vite-ssr/issues/97

Instead of double JSON-stringifying, which can add a lot of \ characters to escape double quotes (because JSON tends to have lots of double quotes, for every property name and string), serialize state as a JSON object wrapped in single quotes.

frandiox commented 3 years ago

Thanks @dchenk !