So, do you think we should proactively pull the exports out of the global scope here? Or is it expected that if you don't want to litter the global scope from third-party libraries, that you pass a define() function in that cleans up the script's droppings?

I understand this might break chained dependency loading if we did. To get around that we could keep a record of exports that need to be cleaned up and do it in one go after the system is initialised.

That might be getting a bit complicated though.

Also, do you think you should be able to pass a list of exports in as an option as well? It could resolve the whole list and then add them all to an object. I know some third-party libs that export multiple globals and this could nicely handle that case I think.