-
-
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
Babel AST transform drops Recast's original
property
#12882
Comments
Hey @NickHeiner! 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." |
You can try passing |
That fixes it! Thanks. |
Bug Report
Maybe you don't consider this a bug, but I thought I'd flag it anyway.
Current behavior
Recast (
0.20.4
) works by attaching anoriginal
property to AST nodes.babel.transformFromAst
drops that property, preventing Recast from working as expected.This is demonstrated by the following script:
This produces:
Expected behavior
Program output:
Environment
Possible Solution
This workaround addresses the issue, but it's a bit cumbersome. Here's the snippet above with the workaround applied:
Additional context
The text was updated successfully, but these errors were encountered: