regenerator
regenerator copied to clipboard
Support source maps for generated code
The best place to implement source map support is probably in https://github.com/benjamn/recast, which is a dependency, but I wanted to have an issue here so that people know source maps are on the roadmap.
How come you guys didn't use escodegen? When used with esprima, it can magically generate the source maps for you already. Just curious.
@jlongster That's an interesting idea. I used https://github.com/benjamn/recast only because it's a tool I wrote and understand, but the dependency is very small/swappable (essentially confined to https://github.com/facebook/regenerator/blob/master/main.js). Want to try using escodegen
instead and submit a PR? If you don't, I probably will!
I'm booked for the next month, otherwise I would! I will if it hasn't been done by then. Glad to hear it should be pluggable; I thought recast also provided some tools for transformation that you were using. I choose my own tools too :) But in this case, I think you would win a lot from escodegen.
Great job in the library. I've seen several attempts at this and none of them come close.
Are there any plans to implement this in the nearby future?
It looks like recast supports source maps now, so is this still an issue?
Thank you for reporting this issue and appreciate your patience. We've notified the core team for an update on this issue. We're looking for a response within the next 30 days or the issue may be closed.
So is this still an issue ?
Yes i believe it is. My workaround is to not transpile generators when debugging locally as the latest version of chrome supports them anyway. In my case that meant removing the es2015 preset and installing and using its plugins as necessary to get a working system again (only "transform-es2015-modules-commonjs" for me but perhaps I'm behind the curve ;) )