-
Notifications
You must be signed in to change notification settings - Fork 26
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
Question: Surplus + TypeScript - debugging experience (issue with source maps?) #81
Comments
There is nothing to do with this issue in surplus repository. So this question can be closed now. |
That's an interesting PR! Yeah, this isn't just an issue with parcel but with all the build tools. A friend of mine @TimHambourger looked into this a while back and found that it appeared to be caused by this issue in the |
I also initially look to
May be this is very specific for TypeScript+Surplus case and |
I have played more with About "including white spaces to source map". Assume we have the following code:
The value of "generatedColumn" of the line 2 of the above code sample in source map will be: If Surplus will skip leading spaces in this line then the resulting "generatedColumn" will be also 4 and originalPositionFor will try to search with generatedColumn == 4 in TypeScript mappings and will not return null. Does it possible to implement in Surplus? |
Here is the the commit to parcel-plugin-surplus with a little bit hacky solution to solve the mentioned above issue. I am not sure if it should be merged but you steel can test how it works by adding parcel-plugin-surplus like this: |
Hi,
First I want to say thank you for so great library (both Surplus and s-js).
I am trying to use Surplus together with TypeScript. And everything works fine except the debugging.
It is almost not possible to set breakpoints in the .ts and .tsx files.
It looks like the source maps are not properly updated.
With .js and .jsx files everything works fine.
This issue can be easily reproduced with original example in parcel-plugin-surplus.
Just try to put breakpoint in index.tsx file.
Do you have any suggestions how to improve/solve that?
The text was updated successfully, but these errors were encountered: