Skip to content
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 map line numbers wrong #434

Open
Floffah opened this issue Oct 10, 2021 · 1 comment
Open

Source map line numbers wrong #434

Floffah opened this issue Oct 10, 2021 · 1 comment

Comments

@Floffah
Copy link

Floffah commented Oct 10, 2021

This issue is the same as the one in esbuild #638 and was fixed there. I have tested my codebase using raw esbuild and the issue is not present there.
Basically, the problem is that line numbers are wrong in source maps therefore in stack traces.
You can reproduce using this repo https://github.com/Floffah/crossant/tree/tsup-problems/packages/bot

it seems this only happens when using splitting

Expected (using esbuild):
image
image
the error was created on this line
https://github.com/Floffah/crossant/blob/tsup-problems/packages/bot/src/sharding/AppManager.ts#L97
(i know i forgot to minify, however if i minify it the line number is still correct here)

What really happens (with tsup):
image
image
the tsup sourcemap points to this line
https://github.com/Floffah/crossant/blob/tsup-problems/packages/bot/src/sharding/AppManager.ts#L188

@alexng353
Copy link

alexng353 commented Sep 7, 2023

I am experiencing the same issue (correct file, wrong line number) as this issue and evanw/esbuild#638

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants