nanojsx / nano

🎯 SSR first, lightweight 1kB JSX library.
http://nanojsx.io
MIT License
1.45k stars 38 forks source link

Exports initSSR #139

Closed igorjacauna closed 1 year ago

igorjacauna commented 1 year ago

Exports initSSR to help when occurs document is not defined with renderSSR

I'm using Vite to build my SSR application and initSSR is missing in exports, causing incorrectly bundle build

yandeu commented 1 year ago

I don't recommend using initSSR() manually, but instead wrap your component inside a anonymous function.

See https://github.com/nanojsx/nano/issues/106

igorjacauna commented 1 year ago

Thanks @yandeu! I thought that there was not a problem to use initSSR() manually.

I will follow the approach from #106!