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

[Feature]: jsx runtime should be synced between tsconfig and swc #304

Open
fi3ework opened this issue Oct 17, 2024 · 3 comments
Open

[Feature]: jsx runtime should be synced between tsconfig and swc #304

fi3ework opened this issue Oct 17, 2024 · 3 comments

Comments

@fi3ework
Copy link
Member

What problem does this feature solve?

See

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?

  1. Automatically read from tsconfig: @rsbuild/pluigin-react's config automatically follows tsconfig.
  2. Or, only check're the configuration are matched and emit a warning when conflict.
@Timeless0911
Copy link
Collaborator

Rsbuild does not want to be associated with the fields in tsconfig.json, we may do config check in Rslib.

@fi3ework
Copy link
Member Author

I don't want to make Rslib detect and modify @rsbuild/plugin-react's existence, as React is not a built-in solution nor anything special in Rslib.

I prefer to check the consistency of tsconfigjson.jsx and jsc.transform.react.runtime and emit warning.

@Timeless0911
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants