TypeScript builds ignore tsconfig compilerOptions.jsx. Output is always 'react-jsx' #678
Open
1 of 2 tasks
Labels
bug
Something isn't working
Description
Libraries built with
react-native-builder-bob
do not respect thetsconfig.config#compilerOptions.jsx
setting, and force the output to bereact-jsx
. This is a problem for React Native libraries which normally publish asjsx: 'react-native' or 'preserve'
.Libraries such as
@emotion/native
andNativeWind
both rely on setting a customjsxImportSource
, which only works when a library has been published with persevered JSX. This means libraries built withreact-native-builder-bob
will stop working with these libraries.The cause of this issue is the babel-preset, which should conditionally turn off
'@babel/plugin-transform-react-jsx'
/'@babel/plugin-transform-react-jsx-development'
whenjsx
is set toreact-native
orpreserve
.Packages
Selected options
Link to repro
https://github.com/marklawlor/react-native-builder-bob-jsx
Environment
The text was updated successfully, but these errors were encountered: