use module id if available for umd global name - fixes #1166
This commit is contained in:
@@ -0,0 +1 @@
|
||||
foobar();
|
||||
@@ -0,0 +1,17 @@
|
||||
(function (global, factory) {
|
||||
if (typeof define === "function" && define.amd) {
|
||||
define("MyLib", ["exports"], factory);
|
||||
} else if (typeof exports !== "undefined") {
|
||||
factory(exports);
|
||||
} else {
|
||||
var mod = {
|
||||
exports: {}
|
||||
};
|
||||
factory(mod.exports);
|
||||
global.MyLib = mod.exports;
|
||||
}
|
||||
})(this, function (exports) {
|
||||
"use strict";
|
||||
|
||||
foobar();
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"moduleId": "MyLib"
|
||||
}
|
||||
Reference in New Issue
Block a user