Open supercairos opened 5 months ago
You can set sourceRoot with:
swc( ... source_root = package_name() # or native.package_name() in macros )
However I haven't solved the missing path in the sources array
Actually, this commit made it work for me: https://github.com/aspect-build/rules_swc/compare/main...pat-trunk-io:rules_swc:pat/FixSourcesArraySourceMap
@pat-trunk-io that fix looks correct, would you like to open a PR in rules_swc? A test showing it's fixed would also be great if you can add one? Or if your fix breaks an existing test maybe the existing one just needs an update. See the tests that have a *.map.golden
file and try using one of those to demo the fix 👍
Sounds good. Little busy this week, should be able to get around next week.
What happened?
I'm using something simple like this in order to produce source_maps:
This file is in a
BUILD.bazel
in a folder helloIt produce:
Where it should be:
Version
Development (host) and target OS/architectures:
Output of
bazel --version
: 6.4.0Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:Language(s) and/or frameworks involved:
How to reproduce
No response
Any other information?
No response