Hacker News new | ask | show | jobs
by beardedetim 1087 days ago
I think, if I'm recalling it correctly, that the component that is defining it in the docs can be either client or server and by marking the functiom as server only, Next knows to do magic.
1 comments

Next may know that but developers sure won't.
This kind of noodley bundling opt-out is also extremely dangerous from a security perspective. I expect there are a lot of Next.js apps leaking code and possibly secrets that should only be available on the server.