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
Fix named destructuring exports #14655
Fix named destructuring exports #14655
Conversation
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/52188/ |
What is the output before this PR? |
({ | ||
foo: bar, | ||
baz | ||
} = {}), _export("baz", baz); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nicolo-ribaudo before this pr, will not export baz
@@ -190,7 +190,7 @@ export default declare<PluginState>((api, options: Options) => { | |||
return; | |||
} | |||
const exportedNames = this.exports[name]; | |||
if (!exportedNames) return; | |||
if (!exportedNames) continue; | |||
for (const exportedName of exportedNames) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If here not find matched export name, here will go out of function. The other names will not add to export.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
@JLHwung Can you publish a new version for this? Thanks :) |
Ok, doing it now. |
…ructuring object
Fixes #1, Fixes #2