-
-
Notifications
You must be signed in to change notification settings - Fork 1.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
Source maps aren't loaded correctly in Chrome Node DevTools #2362
Comments
I tried, doesn't help unfortunately. |
Tried (a variation of options with NOTE: I am using a project with swc packages only (not the swc-node variant):
|
It looks like there are multiple different roots to investigate (from |
swc_ecma_codegen: - Handle source map of multi-line template literals. (Closes swc-project#2185, Closes swc-project#2362, Closes swc-project#2900)
Just FYI looks, I'm extremely happy. I haven't had any problems since recently - I will keep this thread updated. Thank you!! ⭐ |
Can you try the latest version of Patches in #4007 are very likely to fix this issue. |
Can anyone make an executable repro case? See https://github.com/kdy1/swc/tree/6cea544afa481e063cff6d8d493d8d12dadb280a/crates/swc/tests/stacktrace for exmaple repro case. |
Can you try the latest version? ( |
If it helps, I'm still having the same issue and was able to create a quick repo to reproduce it: https://github.com/daviduzumeri/swctest Any help would be appreciated, as we're pretty much back to |
I found that |
This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
I ran
node --inspect-brk -r @swc/register some_script.ts
and then openedchrome://inspect
- DevTools for Node. Source maps weren't loaded properly (was showing a transpiled JS content under a TS filename). I checked with babel and it works fine. There seems to be a difference between babel and swc that makes it break - I used debugger to dynamically modify swc source maps and managed to see it working.It looks like embedding full filename path in sources doesn't work in Chrome DevTools for Node. What babel does, and seems to make it work - is encodes directory path in sourceRoot and just filename in sources.
This works (babel):
This doesn't (swc):
The text was updated successfully, but these errors were encountered: