Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another Babel reexport check form #43

Closed
guybedford opened this issue Mar 9, 2021 · 1 comment
Closed

Another Babel reexport check form #43

guybedford opened this issue Mar 9, 2021 · 1 comment

Comments

@guybedford
Copy link
Collaborator

guybedford commented Mar 9, 2021

Posted #42 with a failing test for the following reexport form in Babel:

        var _p = require("p");
        Object.keys(_p).forEach(function (key) {
          if (key === "default" || key === "__esModule") return;
          if (key in exports && exports[key] === _p[key]) return;
          Object.defineProperty(exports, key, {
            enumerable: true,
            get: function () {
              return _p[key];
            }
          });
        });

We should probably add support for the if (key in exports && exports[key] === _p[key]) return; line here I think.

@guybedford
Copy link
Collaborator Author

Turns out the test was incorrectly constructed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant