Why import client component in server component but not return it as part of render still increases the SSG first load JS size? #55985
Unanswered
TrustyTechSG
asked this question in
Help
Replies: 1 comment 3 replies
-
I think it is because the client component bundle is included as a potential branch of the code. In other words, there doesn't seem to be code elimination based on potential runtime values. What decides mode's value? Maybe you could do |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Summary
Hi, for example like below page.js (Server component)
To my understanding the SSG size of above page.js should based on page props "mode" value, so the final SSG page size should only be determined by one of the return component only. But I notice this is only true if all import component are server component, if import component is client component, then it will increases the page.js first load JS size. Am I doing something wrong? Big thanks.
Additional information
No response
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions