Closed pdanpdan closed 8 months ago
The latest updates on your projects. Learn more about Vercel for Git ↗︎
Name | Status | Preview | Comments | Updated (UTC) |
---|---|---|---|---|
repl | ✅ Ready (Inspect) | Visit Preview | 💬 Add feedback | Jan 3, 2024 10:21am |
This would break previous customCode
usage that assumes it runs on client only. Maybe it's better to add a separate option for SSR custom code?
Sure, no problem - customCodeSSR.{importCode, useCode}
is ok?
If I change the option name to have specific entries for SSR I would drop the SERVER context constant
from:
SSR_SERVER: true only if the code is executed in SSR mode on server
SSR_CLIENT: true only if the code is executed client side on client takeover
SSR_SERVER: false + SSR_CLIENT: false => SPA mode (pure client)
SSR_SERVER: true => SSR mode on server side
SSR_CLIENT: true => SSR mode on client side
to
SSR_CLIENT: true only if the code is executed client side on client takeover
SSR_CLIENT: false => SPA mode (pure client)
SSR_CLIENT: true => SSR mode on client side
Allow code to be imported and used in the SSR render (now it can only be added on client side). In order to provide context about execution mode we provide SSR_CLIENT context constant:
SSR_CLIENT: true only if the code is executed client side on client takeover
SSR_CLIENT: false => SPA mode(pure client) SSR_CLIENT: true => SSR mode on client side