Closed mboudreau closed 9 years ago
UMD is just about setting up a declaration of a module, not about specific dependencies or how they are loaded. Defining an XMLHttpRequest object or using XHR for module loading is not in the scope of UMD, only a way to indicate dependencies and exports for generic modules.
@jrburke would have to respectfully disagree. You're trying to make a Universal Model Definition. Shouldn't that include the 'model' bit where they can be used in the same way? Some of the global variables would have to work everywhere.
It might be outside of the scope of this specification, but I can't even find a good tutorial, alternative or solution to my problem. Is UMD completely ignoring my valid use case?
I have a project that's built to use node, requirejs and regular web scripts. It uses XMLHttpRequest to make calls to the server, but that's not available by default in node. It needs to be required first.
I found a few solutions, but all of them feels hacky. Is there any way of doing this easily? Shouldn't UMD have this 'feature' built in?
Any help would be greatly appreciated.
Cheers.