Skip to content
This repository was archived by the owner on Jan 23, 2021. It is now read-only.
This repository was archived by the owner on Jan 23, 2021. It is now read-only.

[lit]: source maps #12

@talon

Description

@talon

Is your feature request related to a problem? Please describe.
Currently the parser doesn't provide any source maps. This causes trouble in downstream tools like Jest when it comes to line numbers. Test results don't point to the right line number and column

Describe the solution you'd like
If the parser properly provided source maps I believe this issue would be resolved

Describe alternatives you've considered
It wouldn't be possible to make the parser output files of the same number of lines as the /** jsdoc comment already adds extra lines and is a feature I don't wanna break

Additional context
I think creating the source map shouldn't be too difficult with https://github.com/mozilla/source-map

as far as plugging that into Babel I am confused. You can tell babel to make source maps https://babeljs.io/docs/en/options#inputsourcemap

but I don't know how to tell it I made source maps for a file I parsed
https://github.com/talon/javascript-registry/blob/master/packages/lit/lib/babel.js#L43

typescript I'm pretty sure does this so maybe that repo would help maybe

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions