transform-ast is similar to falafel but generates source maps using magic-string. if the input source code already contains a source map, the generated source map takes that into account and maps back to the original source.
it is not mapped individually, so you only know that the error was thrown somewhere in the template string.
that's still better than the current situation though, because not doing source maps at all means other transforms's source maps will be thrown off by N lines, and then errors would be pointing to the wrong thing entirely.
transform-ast is similar to falafel but generates source maps using magic-string. if the input source code already contains a source map, the generated source map takes that into account and maps back to the original source.
with babelify + yo-yoify, using https://sokra.github.io/source-map-visualization:
it maps back mooostly to the correct places--some things aren't perfect, for example if you have a big inline function
it is not mapped individually, so you only know that the error was thrown somewhere in the template string.
that's still better than the current situation though, because not doing source maps at all means other transforms's source maps will be thrown off by N lines, and then errors would be pointing to the wrong thing entirely.