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
babel-plugin-transform-es2015-function-name should not create function names with reserved words. (T7235) #4198
Comments
Some discussion here: rollup/rollup#564 |
Is it possible to confirm this is a bug or not? Currently, I'm using the following to avoid generating an invalid function name:
This also works:
|
We could probably debate either way on for the code output, but it'd probably be better to err on the side of compatibility, so we should update out reserved word logic to avoid this. On the other side, Babylon appears to parse |
I filled estools/esutils#24 to fix this. |
bump - Still not merged, even though the merge-requests looks good. This is an anoying bug when using babel with d3. |
We should just land #4954 or do it ourselves then? |
#4952 landed in master, need to release |
Bug information
Options
Input code
Input:
Output:
Description
await
is a reserved word (when found in module code). It is valid in the input as an object property but invalid in the output as the function name.The text was updated successfully, but these errors were encountered: