register icon indicating copy to clipboard operation
register copied to clipboard

Source maps not working?

Open wodCZ opened this issue 2 years ago • 0 comments

I've been digging into details while preparing reproduction for the following IntelliJ issue: https://youtrack.jetbrains.com/issue/WEB-52287/Debugging-doesnt-work-correctly-with-swc-transpiler-https-github.com-swc-project-swc

It looks like the source maps are not outputted, or incorrect in some way? See the attached issue, and the reproduction repository: https://github.com/wodCZ/swc-register-inspect-repro

Unfortunately, I wasn't able to find a workaround on how to reliably attach debugger to a process running through @swc/register.

Sourcemaps are fine when building the project with the same configuration and debugging the compiled js file. However, that's a large inconvenience for an interactive debugging of large node projects.

// EDIT: I've just tried with https://github.com/swc-project/swc-node and it's working correctly. Should that @swc-node/register be used instead of @swc/register?

wodCZ avatar Sep 10 '23 14:09 wodCZ