Skip to content

[Bug]: Incorrect imports #325

@jlesquembre

Description

@jlesquembre

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions