-
Notifications
You must be signed in to change notification settings - Fork 139
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
Empty template spans break sourcemaps #825
Comments
I did some digging and I think i figured out what's going on. The issue arises only when the tokenizer generates zero-length
(the When a token is empty, the |
Septh
added a commit
to Septh/sucrase
that referenced
this issue
Feb 6, 2024
Septh
added a commit
to Septh/sucrase
that referenced
this issue
Feb 17, 2024
Septh
changed the title
Template strings break sourcemaps
Empty template spans break sourcemaps
Mar 12, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have set up a repro here: https://github.com/Septh/sucrase-broken-sourcemaps.
After cloning and installing, run
node sucrase.js
to compile the TypeScript code; you can then upload the resultingindex.js
file to Evan Wallace's excellent source-map-visualization tool.Here's what I get:
(permalink)
As you can see, the original column number stays 'stuck' at the end of the first template string.
The text was updated successfully, but these errors were encountered: