-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
export default async function foo() {}
does not declare foo
#8697
Comments
Hey @mroch! We really appreciate you taking the time to report an issue. The collaborators If you need any help, or just have general Babel or JavaScript questions, we have a vibrant Slack |
What is the code generated by Babel? You are disabling the async functions transform ( |
Hi @mroch! A maintainer of the project has notified me that you're missing Please understand that we receive a high volume of issues, and there are only a limited number Please make sure you have the following information documented in this ticket:
Please provide either a link to the problem via the |
I just tested this and I'm not able to reproduce this. If it is still a problem please reopen and provide an example that triggers the error. |
Bug Report
Current Behavior
in node 10.10 with
--experimental-modules
, this logs"foo"
. in babel 7.0.0, it saysfoo
is not defined.Expected behavior/code
I think
foo
should be in scope.it's in scope if you remove
async
. the spec has the same rules for allExportDeclaration: export default HoistableDeclaration
productions, which also leads me to believe that if it's in scope for non-async functions, it should work the same for async functions as well.Babel Configuration (.babelrc, package.json, cli command)
Environment
The text was updated successfully, but these errors were encountered: