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

Support for source maps #6471

Closed
ghost opened this issue Apr 29, 2016 · 6 comments
Closed

Support for source maps #6471

ghost opened this issue Apr 29, 2016 · 6 comments
Labels
feature request Issues that request new features to be added to Node.js. v8 engine Issues and PRs related to the V8 dependency.

Comments

@ghost
Copy link

ghost commented Apr 29, 2016

I don't know if this has been asked before (couldn't find anything), but it would be quite nice if, just like Chrome and other programs, Node.js would have built-in support for source maps.

Currently, there is node-source-map-support, which is quite good, but given the myriad of JavaScript dialects that are in use today and given that source maps are so widespread, I think it would be useful if was default behavior of Node itself.

Can be considered low-priority, of course.

@ChALkeR ChALkeR added the feature request Issues that request new features to be added to Node.js. label Apr 29, 2016
@bnoordhuis
Copy link
Member

Previous discussion: nodejs/node-v0.x-archive#3712

I don't think source map support is out of the question but a lot depends on whether it can be added without causing performance regressions in the module loader and elsewhere.

We can leverage v8::UnboundScript::GetSourceMappingURL() to avoid scanning the source ourselves. The problematic part is almost certainly rewriting stack traces; I speculate V8 will have to support source maps natively in order for that to perform well. Anyone who wants to take that on should file a bug or email v8-dev@ to get their input first.

@Fishrock123 Fishrock123 added the v8 engine Issues and PRs related to the V8 dependency. label Apr 29, 2016
@Fishrock123
Copy link
Contributor

I've thought of this, but seems fine as a user module solution if that works well.

@ghost
Copy link
Author

ghost commented Apr 29, 2016

@Fishrock123 True; that's why I thought of it as low-priority.

@jasnell
Copy link
Member

jasnell commented Apr 29, 2016

+1 on @bnoordhuis' comment. If this were to be done efficiently I would have to imagine it would need to be in v8 itself. /cc @nodejs/v8

@jasnell
Copy link
Member

jasnell commented May 17, 2016

FYI: related: #6725 (comment)

@Trott
Copy link
Member

Trott commented Jul 7, 2017

This issue has been inactive for sufficiently long that it seems like perhaps it should be closed. Feel free to re-open (or leave a comment requesting that it be re-opened) if you disagree. I'm just tidying up and not acting on a super-strong opinion or anything like that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Issues that request new features to be added to Node.js. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

No branches or pull requests

5 participants