fix(ssr): load sourcemaps alongside modules#11780
Conversation
|
/ecosystem-ci run |
|
📝 Ran ecosystem CI: Open
|
|
Will this work if I set a breakpoint on the first line of a file? |
|
I think it doesn't. I guess we can append |
|
|
||
| const isSourceMapEnabled = process.argv[2] === 'true' | ||
| process.setSourceMapsEnabled(isSourceMapEnabled) | ||
| console.log('# sourcemaps enabled:', isSourceMapEnabled) |
There was a problem hiding this comment.
This won't work if something called process.setSourceMapsEnabled after this line. (I mean the isSourceMapEnabled will not be synced with the actual value.)
I've created a feature request to Node to fix this: nodejs/node#46304
|
Ah I see that makes sense, that's fine I think |
|
Hi, I've added a fix to the PR, you can check it out in |
patak-dev
left a comment
There was a problem hiding this comment.
Let's merge this one so we can test it during the current beta.
|
How to break points in vscode? Doesn't work on |
Description
This PR reapplies #11576 with a fix and tests.
Also this PR adds some comments why this works.
fixes #3288
cc @patak-dev @Vap0r1ze @benmccann
Additional context
#11576 requires source map support for
new Functionwhich landed in Node.js "^16.17.0 || >=18.6.0".Adding the offset seems to be required due to V8's bug (nodejs/node#43047 (comment)). When the bug is fixed, that part of the code needs to be removed.
What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following
fixes #123).