What happened?
Generating the .swcrc file results in incorrectly imports if the paths option is used.
Version
Development (host) and target OS/architectures:
darwin-arm64
Output of bazel --version:
aspect 2025.19.5+06d8a1c78
How to reproduce
See my fork, swcrc_example branch:
https://github.com/jlesquembre/rules_swc/tree/swcrc_example
Here is the diff:
main...jlesquembre:rules_swc:swcrc_example
bazel test //examples/generate_swcrc:test_compile
cat bazel-bin/examples/generate_swcrc/app/main.js
However, if you use a .swcrc file from the file system instead of the generated one, it works:
https://github.com/jlesquembre/rules_swc/blob/1ae900374e165013b5a53ae7a8e36cd512ceefde/examples/generate_swcrc/BUILD.bazel#L25-L29
What happened?
Generating the
.swcrcfile results in incorrectly imports if thepathsoption is used.Version
Development (host) and target OS/architectures:
darwin-arm64Output of
bazel --version:aspect 2025.19.5+06d8a1c78How to reproduce
See my fork,
swcrc_examplebranch:https://github.com/jlesquembre/rules_swc/tree/swcrc_example
Here is the diff:
main...jlesquembre:rules_swc:swcrc_example
bazel test //examples/generate_swcrc:test_compile cat bazel-bin/examples/generate_swcrc/app/main.jsHowever, if you use a
.swcrcfile from the file system instead of the generated one, it works:https://github.com/jlesquembre/rules_swc/blob/1ae900374e165013b5a53ae7a8e36cd512ceefde/examples/generate_swcrc/BUILD.bazel#L25-L29