-
-
Notifications
You must be signed in to change notification settings - Fork 6.2k
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
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 Function
which 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
).