You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You would see the source maps are being used correctly, replacing the name of the file with the name of the original file ("test.js").
true
/tmp/test.js:3
throw new Error();
^
Error
at Object.<anonymous> (/tmp/test.js:3:7)
at Module._compile (node:internal/modules/cjs/loader:1434:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1518:10)
at Module.load (node:internal/modules/cjs/loader:1249:32)
at Module._load (node:internal/modules/cjs/loader:1065:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:158:12)
at node:internal/main/run_main_module:30:49
Node.js v22.2.0
However, if you were to pipe it through stdin, the source maps will not work and instead you'll just get [stdin].
true
[stdin]:4
throw new Error();
^
Error
at [stdin]:4:7
at runScriptInThisContext (node:internal/vm:209:10)
at node:internal/process/execution:118:14
at [stdin]-wrapper:6:24
at runScript (node:internal/process/execution:101:62)
at evalScript (node:internal/process/execution:136:3)
at node:internal/main/eval_stdin:32:5
at Socket.<anonymous> (node:internal/process/execution:237:5)
at Socket.emit (node:events:532:35)
at endReadableNT (node:internal/streams/readable:1696:12)
Node.js v22.2.0
How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
It should probably build a stack trace with the source map information.
What do you see instead?
Source maps are not being used.
Additional information
No response
The text was updated successfully, but these errors were encountered:
Version
v22.2.0
Platform
Linux 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 GNU/Linux
Subsystem
No response
What steps will reproduce the bug?
I'm using esbuild to generate a very small source map for the next code:
I'm calling an internal function I found to see if the source maps are enabled. Here's the code, esbuild spits out:
If you were to write this to a file, say
otherFile.js
and run it like so:You would see the source maps are being used correctly, replacing the name of the file with the name of the original file ("test.js").
However, if you were to pipe it through stdin, the source maps will not work and instead you'll just get
[stdin]
.How often does it reproduce? Is there a required condition?
No response
What is the expected behavior? Why is that the expected behavior?
It should probably build a stack trace with the source map information.
What do you see instead?
Source maps are not being used.
Additional information
No response
The text was updated successfully, but these errors were encountered: