[cjs] Skip duplicate reexported bindings in namespace reexports (#11739)

This commit is contained in:
Niklas Mischkulnig
2020-09-28 16:22:13 +02:00
committed by GitHub
parent 39a12674b4
commit a080c82777
17 changed files with 26 additions and 1 deletions

View File

@@ -16,6 +16,7 @@
_exports.__esModule = true;
Object.keys(_foo).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in _exports && _exports[key] === _foo[key]) return;
_exports[key] = _foo[key];
});
});

View File

@@ -18,6 +18,7 @@
});
Object.keys(_foo).forEach(function (key) {
if (key === "default" || key === "__esModule") return;
if (key in _exports && _exports[key] === _foo[key]) return;
Object.defineProperty(_exports, key, {
enumerable: true,
get: function () {