You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hey @sebastian-nowak! We really appreciate you taking the time to report an issue. The collaborators
on this project attempt to help as many people as possible, but we're a limited number of volunteers,
so it's possible this won't be addressed swiftly.
If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack
community that typically always has someone willing to help. You can sign-up here
for an invite.
Oh, I see, thank you for the explanation. These little inconsistencies are really confusing. Surprisingly export default creates a live binding, when exporting a named function or class.
Yup. In the grammer hereexport default HoistableDeclaration and export default ClassDeclaration create live bindings, and export default AssignmentExpression does not.
The important part being here where export default AssignmentExpression is [[LocalName]]: "*default*" whereas the others are [[LocalName]]: localName. *default* is essentially the _tmp from my example.
lockbot
added
the
outdated
A closed issue/PR that is archived due to age. Recommended to make a new issue
label
May 5, 2018
lockbot
locked as resolved and limited conversation to collaborators
May 5, 2018
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
i: bugoutdatedA closed issue/PR that is archived due to age. Recommended to make a new issue
When exporting a mutable variable as default, it's handled differently depending on how it was exported. See the example below.
exportDefault.js:
exportBraces:js
test.js
These two methods should output the same value. You can easily see what's happening if you look at the transpiled code.
exportDefault_transpiled.js:
exportBraces_transpiled.js:
Tested on babel 6.21.0 and on https://babeljs.io/repl/.
The text was updated successfully, but these errors were encountered: