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

doesn't seem to detect export * #59

Closed
tyler-johnson opened this issue Jul 11, 2018 · 0 comments
Closed

doesn't seem to detect export * #59

tyler-johnson opened this issue Jul 11, 2018 · 0 comments
Labels

Comments

@tyler-johnson
Copy link
Contributor

tyler-johnson commented Jul 11, 2018

I have a file that looks like this:

export * from "./a";
export default function() {}

The output with this plugin looks like this:

"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});

var _a = require("./a");

Object.keys(_a).forEach(function (key) {
  if (key === "default" || key === "__esModule") return;
  Object.defineProperty(exports, key, {
    enumerable: true,
    get: function get() {
      return _a[key];
    }
  });
});

exports.default = function () {};

module.exports = exports["default"];

This ends up overwriting everything exported used the * syntax. I would expect that this would not add the module.exports line when there is an export * present.

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

Successfully merging a pull request may close this issue.

2 participants