deoptigate
deoptigate copied to clipboard
Support sourcemaps
When running deoptigate on my large project, which has been compiled from TypeScript to JavaScript, I get this:
The file, and most files that it require
s do have inline sourcemaps. Adding support for those could help move these arrows to their correct positions.
Even with this flaw, the tool is really useful already, since I can see the function names referred to on the right hand side for each of the items. Big thanks!
oh, and:
> node --version
v9.4.0
> uname -srvpoi
Linux 4.13.0-43-generic #48-Ubuntu SMP Wed May 16 12:18:48 UTC 2018 x86_64 x86_64 GNU/Linux
Using deoptigate 0.3.0
I agree that would be a great feature. However deoptigate doesn't necessarily know how to resolve those easily, all it has are paths to the files that ran.
I don't think it's impossible, but wouldn't be trivial. Maybe there is a way to tell deoptigate where to look for map files for the files.
Then it still would have to translate where the markers would go (and wouldn't be able to syntax highlight as it only supports JS ATM).
So a pretty large chunk of work .. I'm open to have someone take this on and help where I can. It would definitely be an interesting feature.
On the other hand just stripping inline source maps before creating the data file with the included sources should be trivial with convert-source-map. Would that solve the larger part of your problem?
If so could you take a stab of adding that step as part of file source resolution and file a PR?