Merge pull request #6238 from loganfsmyth/reexport-name-priority
Named exports should always take priority over star exports
This commit is contained in:
@@ -1 +1,8 @@
|
||||
export let z = 100;
|
||||
export * from 'mod';
|
||||
export class a {}
|
||||
export function b() {}
|
||||
export { c } from 'mod';
|
||||
export let d = 42;
|
||||
export let e = 1, f = 2;
|
||||
export default function() {}
|
||||
|
||||
@@ -3,11 +3,30 @@
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var _exportNames = {
|
||||
z: true,
|
||||
a: true,
|
||||
b: true,
|
||||
d: true,
|
||||
e: true,
|
||||
f: true,
|
||||
c: true
|
||||
};
|
||||
exports.b = b;
|
||||
exports.default = _default;
|
||||
Object.defineProperty(exports, "c", {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
return _mod.c;
|
||||
}
|
||||
});
|
||||
exports.f = exports.e = exports.d = exports.a = exports.z = void 0;
|
||||
|
||||
var _mod = require("mod");
|
||||
|
||||
Object.keys(_mod).forEach(function (key) {
|
||||
if (key === "default" || key === "__esModule") return;
|
||||
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
||||
Object.defineProperty(exports, key, {
|
||||
enumerable: true,
|
||||
get: function () {
|
||||
@@ -15,3 +34,20 @@ Object.keys(_mod).forEach(function (key) {
|
||||
}
|
||||
});
|
||||
});
|
||||
var z = 100;
|
||||
exports.z = z;
|
||||
|
||||
class a {}
|
||||
|
||||
exports.a = a;
|
||||
|
||||
function b() {}
|
||||
|
||||
var d = 42;
|
||||
exports.d = d;
|
||||
var e = 1,
|
||||
f = 2;
|
||||
exports.f = f;
|
||||
exports.e = e;
|
||||
|
||||
function _default() {}
|
||||
|
||||
Reference in New Issue
Block a user