Add test case for overriding exported global name without specifying the moduleId or moduleIds options

This commit is contained in:
Richard Macklin 2016-07-03 01:19:00 -07:00
parent ac9487abf3
commit 6c9f241812
3 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1 @@
export default 42;

View File

@ -0,0 +1,20 @@
(function (global, factory) {
if (typeof define === "function" && define.amd) {
define(["exports"], factory);
} else if (typeof exports !== "undefined") {
factory(exports);
} else {
var mod = {
exports: {}
};
factory(mod.exports);
global.baz = mod.exports;
}
})(this, function (exports) {
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = 42;
});

View File

@ -0,0 +1,11 @@
{
"plugins": [
"external-helpers",
["transform-es2015-modules-umd", {
"globals": {
"actual": "baz"
},
"exactGlobals": true
}]
]
}