Isn't that a huge problem to solve though? I don't think i've seen a consistent model for this that suppots both Browser and Server(Node). Node is simple, but Browser has a lot of possible implementations, and a lot of preferences from userspace on how it should technically be implemented.
Ie, i have a strong dislike for how RequireJS handles this. I much prefer simply embedding with Browserify and the like.
How would you handle this issue, i wonder?
This is a huge issue, and I'm still thinking about it. That's why I didn't add native require support yet. I'm hoping that the community would come up with a good idea.
I think you should stay far away. It's a solved problem.