Skip to content

Commit

Permalink
Add explanation
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Jun 23, 2020
1 parent d80a61c commit d7f8014
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion packages/babel-helper-module-transforms/src/index.js
Expand Up @@ -241,7 +241,13 @@ function buildNamespaceReexport(metadata, namespace, loose) {
EXPORTS[key] = NAMESPACE[key];
});
`
: template.statement`
: // Also skip already assigned bindings if they are strictly equal
// to be somewhat more spec-compliant when a file has multiple
// namespace re-exports that would cause a binding to be exported
// multiple times. However, multiple bindings of the same name that
// export the same primitive value are silently skipped
// (the spec requires an "ambigous bindings" early error here).
template.statement`
Object.keys(NAMESPACE).forEach(function(key) {
if (key === "default" || key === "__esModule") return;
VERIFY_NAME_LIST;
Expand Down

0 comments on commit d7f8014

Please sign in to comment.