Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support json sources #287

Merged
merged 1 commit into from
Jan 6, 2025
Merged

feat: support json sources #287

merged 1 commit into from
Jan 6, 2025

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

swc/private/swc.bzl Show resolved Hide resolved
swc/private/swc.bzl Outdated Show resolved Hide resolved
@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