Problem
Dependency files that:
- include ESM dynamic imports
- has sourcemaps associated (generated by TSC)
show up in Error stack traces:
- with
.js extension (as opposed to .ts)
- with wrong line numbers
- and with their real file path instead of the original path based on the sourcemap
i.e. their source maps are ignored.
Expected behavior
All dependency files that has sourcemaps associated should show up in Error stack traces with their original path, extension and line numbers.
Minimal reproduction URL
https://github.com/BenceSzalai/tsx-sm-issue
Version
v2.5.5
Node.js version
v18.17.0 / v20.5.1 (v16 is not affected)
Package manager
npm
Operating system
macOS
Contributions
Notes
Originally opened against TXS, but it looks like it is an issue with ESM Loader.
Problem
Dependency files that:
show up in Error stack traces:
.jsextension (as opposed to.ts)i.e. their source maps are ignored.
Expected behavior
All dependency files that has sourcemaps associated should show up in Error stack traces with their original path, extension and line numbers.
Minimal reproduction URL
https://github.com/BenceSzalai/tsx-sm-issue
Version
v2.5.5
Node.js version
v18.17.0 / v20.5.1 (v16 is not affected)
Package manager
npm
Operating system
macOS
Contributions
Notes
Originally opened against TXS, but it looks like it is an issue with ESM Loader.