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 work with loose mode in Babel 7 beta #61

Closed
insin opened this issue Jul 14, 2018 · 0 comments
Closed

Doesn't work with loose mode in Babel 7 beta #61

insin opened this issue Jul 14, 2018 · 0 comments

Comments

@insin
Copy link

insin commented Jul 14, 2018

Here's a cloneable repro Gist with config, input, and outputs, using @babel/* v7.0.0-beta.53 and babel-plugin-add-module-exports v0.3.1:

https://gist.github.com/insin/078533bae2d2e91ec94e90ff91e95593

I suspect the exports.__esModule = true; line in the loose version is triggering the hasExportsNamed check here:

const objectName = path.get(`${property}.left.object.name`).node
const propertyName = path.get(`${property}.left.property.name`).node
if (objectName === 'exports') {
if (propertyName === 'default') {
this.hasExportsDefault = true
} else {
this.hasExportsNamed = true
}
}

Should a special case be added for exports.__esModule?

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

Successfully merging a pull request may close this issue.

2 participants