Skip to content
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

Problem on both using Babel babel/plugin-transform-classes and regenerator for async class methods #521

Open
a20185 opened this issue Dec 6, 2021 · 0 comments

Comments

@a20185
Copy link

a20185 commented Dec 6, 2021

When using both, it seemed that the async methods in _createClass output lose the origin names, compared to the other non-async functions:
image

I found this was troublesome in some cases. Take runtime stack parsing as an example, now function was replaced by another function which name is not the same as original, hence we cannot figure out what function is really running at runtime(Because the error stack now shows at SomeClass.callee$ instead of at SomeClass.yourActualMethod )

image

I'm not quite sure about this transforming procedure machanism is done by babel itself or regenerator transform. An 'option' to preserve the function name, or providing enough infomation at execution will be really really helpful, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant