Skip to content

Conversation

jbedard
Copy link
Member

@jbedard jbedard commented Dec 9, 2024

Align swc with ts_project(resolve_json_modules). If json is in sources it should be "compiled" like any other source just like tsc does.

This could be done in a separate macro which wraps swc, but js source importing json is standard enough any transpiler should support it.


Changes are visible to end-users: yes

  • Searched for relevant documentation and updated as needed: yes
  • Breaking change (forces users to change their own code or config): no
  • Suggested release notes appear below: yes

Support transpiling json source files.

Test plan

  • Covered by existing test cases
  • New test cases added

@jbedard
Copy link
Member Author

jbedard commented Dec 9, 2024

See the rules_ts babel transpiler example as well: aspect-build/rules_ts#747

@jbedard jbedard requested a review from dzbarsky December 9, 2024 03:37
@jbedard jbedard enabled auto-merge (rebase) January 6, 2025 17:58
@jbedard jbedard merged commit 1921be7 into main Jan 6, 2025
11 checks passed
@jbedard jbedard deleted the swc-json-srcs branch January 6, 2025 18:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants