[Feature]: jsx runtime should be synced between tsconfig and swc
What problem does this feature solve?
See https://github.com/web-infra-dev/rslib/blob/f9f1751a304051947ea27d47146d072b9c448da1/examples/react-component-bundle/rslib.config.ts#L39
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.
Rsbuild does not want to be associated with the fields in tsconfig.json, we may do config check in Rslib.
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.
jsx related tests in Modern.js Module: https://github.com/web-infra-dev/modern.js/blob/main/tests/integration/module/fixtures/build/jsx