TypeScript builds ignore tsconfig compilerOptions.jsx. Output is always 'react-jsx'
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 42/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 停滯
- 技術堆疊
- babel, javascript, react-native, typescript
- 領域
- build-system, mobile
研究方向
先從 babel-preset 和連結的重現開始,然後將其行為與 tsconfig compilerOptions.jsx 設為 react-native 或 preserve 時的行為進行比較。確認這些設定會阻止套用 JSX transform plugins;完成的標準是 build 保留設定的 JSX 輸出,而不是始終產生 react-jsx。
由索引模型根據 Issue 內容生成。
描述
Description
Libraries built with react-native-builder-bob do not respect the tsconfig.config#compilerOptions.jsx setting, and force the output to be react-jsx. This is a problem for React Native libraries which normally publish as jsx: 'react-native' or 'preserve'.
Libraries such as @emotion/native and NativeWind both rely on setting a custom jsxImportSource, which only works when a library has been published with persevered JSX. This means libraries built with react-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' when jsx is set to react-native or preserve.
Packages
- create-react-native-library
- react-native-builder-bob
Selected options
Link to repro
https://github.com/marklawlor/react-native-builder-bob-jsx
Environment
- 主要語言
- JavaScript
- 星號
- 3.2k
- 分支
- 229
- 平均合併
- 2 天 6 小時
- 30 天內合併 PR
- 6
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 沒有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
callstack/react-native-builder-bob 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 42/100
callstack/react-native-builder-bob#901 · 1 則留言 ·
-
bug
難度 3/5 1-2 天 新手友好度 42/100
callstack/react-native-builder-bob#896 · 2 則留言 ·
-
bug
難度 4/5 3-5 天 新手友好度 25/100
-
bug
難度 3/5 1-2 天 新手友好度 42/100
callstack/react-native-builder-bob#852 · 1 則留言 · 1 個 reaction ·
-
bug
難度 4/5 3-5 天 新手友好度 35/100
callstack/react-native-builder-bob#829 · 20 則留言 ·
查看 callstack/react-native-builder-bob 的全部 Issue
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 62/100
remotion-dev/remotion#12905 ·
維護者通常 1 天內回覆
-
enhancement websites
難度 2/5 1-3 小時 新手友好度 78/100
quarto-dev/quarto-cli#15255 · 1 則留言 ·
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 72/100
mongoosejs/mquery#142 ·
-
bug
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 65/100
維護者通常 1 天內回覆