That’s not at all what I’m saying.
I’m saying that what runs in the browser is NOT the same code that runs on the server. To get that server-targetted code, that’s often written in a bleeding-edge version of ECMAscript, to run in a browser you need transpilers and bundlers.
Node understands what require means. Most browsers do not.