So this isn't a question on how to do it, but more of a clarification on how it works. I'm using Vue and I'm creating a file that's usable by on both the client side and the server side (logic should be consistent and changes should be easily made).
So what the file uses is the
module.exports object. I can understand this working for the server side (as its using node) but it surprisingly works on client side too.
export instead. But this doesn't work with Node.
So my overall question is, is it expected behaviour that