embroider-build / content-tag

A rust program that uses my swc fork to parse GJS
MIT License
7 stars 7 forks source link

[Feature request] source map generation #61

Closed vstefanovic97 closed 5 months ago

vstefanovic97 commented 5 months ago

I would like to request for content-tag to also return source maps for the files it parses, so that we can map the parsed .js/.ts file back to the original .gjs/.gts file.

Example where this can be useful, when we are building a v2 addon with the standard v2 blueprint with rollup and let's say we want to use babel-plugin-istanbul to instrument our code, we would need the original source maps so that istanbul would know exactly how to map it's coverage to the original .gjs/.gts source files.

ef4 commented 5 months ago

The rust side of this library already supports source maps, we just need to add an option to the JS bindings to expose that usefully.