You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an issue when sorcery a low resolution map for generated source like a magic-string edit tracing back through a higher resolution map like one produced by uglify or typescript. It will loose lots of mappings.
The workaround in rollup is to generate mappings for all AST nodes and then only keep them if the trace back to something, thus the extra resolution drops out.
The problem with that approach is the extra mappings will be mapped back to the start of the line, this not only confuses the debugger but is massively confusing if the start of the line has a name entry.
I'd rather sorcery be able to assume the low res map just has the edits and use that to offset the mappings in the previous map instead of having to get all the sources at the exact same resolution.
Also, is there a reason code isn't shared between rollup and sorcery? It looks roughly about the same.
The text was updated successfully, but these errors were encountered:
I'd rather sorcery be able to assume the low res map just has the edits and use that to offset the mappings in the previous map instead of having to get all the sources at the exact same resolution.
Give this a test drive if you get the chance. Thanks!
There is an issue when
sorcery
a low resolution map for generated source like amagic-string
edit tracing back through a higher resolution map like one produced byuglify
ortypescript
. It will loose lots of mappings.The workaround in
rollup
is to generate mappings for all AST nodes and then only keep them if the trace back to something, thus the extra resolution drops out.The problem with that approach is the extra mappings will be mapped back to the start of the line, this not only confuses the debugger but is massively confusing if the start of the line has a name entry.
https://github.com/Rich-Harris/sorcery/blob/master/src/Node.js#L156
I'd rather sorcery be able to assume the low res map just has the edits and use that to offset the mappings in the previous map instead of having to get all the sources at the exact same resolution.
Also, is there a reason code isn't shared between
rollup
andsorcery
? It looks roughly about the same.The text was updated successfully, but these errors were encountered: