web-infra-dev / web-infra-dev/rslib
[Feature]: jsx runtime should be synced between tsconfig and swc
Open
Nobody has claimed this yet.
💡 feature
- Dominant language
- TypeScript
- Stars
- 1k
- Forks
- 67
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 57
Description
What problem does this feature solve?
When tsconfigjson.jsx is set to react. We need to set swc react runtime to classic explicitly. It's pretty error-prone and trivial.
What does the proposed API look like?
- Automatically read from tsconfig: @rsbuild/pluigin-react's config automatically follows tsconfig.
- Or, only check're the configuration are matched and emit a warning when conflict.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked examples/react-component-bundle/rslib.config.ts reference and trace how tsconfig.json's jsx setting reaches the SWC React runtime configuration. Determine whether the project should automatically synchronize the settings or only warn on conflicts; the issue is done when the chosen behavior is implemented and covered by relevant configuration tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100