wasp-lang / wasp

The fastest way to develop full-stack web apps with React & Node.js.
https://wasp-lang.dev
MIT License
13.85k stars 1.19k forks source link

Google Auth: userSignupFields and getConfig: we don't say they need to be server/nodejs code? #2342

Open Martinsos opened 1 month ago

Martinsos commented 1 month ago

We had a user getting errors here because we was importing these functions from .jsx file: https://discord.com/channels/686873244791210014/1296186131918098536/1296186131918098536 .

I looked in the docs and I don't see however that we say somewhere that these functions have to be server code (actually, taht they can't be client code - because they can also certainly be isomorphic). We should probably say so!

This touches the general question of should we have a way of distinguishing between client and the server code, e.g. files having .server.js or .client.js extensions. Or should it be .node.js / .bun.js / .deno.js? Wild!

Also, the question of should we always make it clear in our docs if function shoudl be client or server code and maybe having a mechanism to easily implement that in the docs.