Open fi3ework opened 1 month ago
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
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 toreact
. We need to set swc react runtime toclassic
explicitly. It's pretty error-prone and trivial.What does the proposed API look like?