-
Notifications
You must be signed in to change notification settings - Fork 25.1k
Closed
Labels
Type: InvalidThis issue does not belong here. Applying this label will cause issue to be closed.This issue does not belong here. Applying this label will cause issue to be closed.
Description
Hi! 👋
Firstly, thanks for your work on this project! 🙂
Today I used patch-package to patch @react-native/babel-preset@0.83.0 for the project I'm working on.
Here is the diff that solved my problem:
diff --git a/node_modules/@react-native/babel-preset/src/configs/main.js b/node_modules/@react-native/babel-preset/src/configs/main.js
index a2f5e1e..9f705e9 100644
--- a/node_modules/@react-native/babel-preset/src/configs/main.js
+++ b/node_modules/@react-native/babel-preset/src/configs/main.js
@@ -188,10 +188,12 @@ const getPreset = (src, options) => {
firstPartyPlugins.push([require('../plugin-warn-on-deep-imports.js')]);
}
- if (options && options.dev && !options.useTransformReactJSXExperimental) {
- extraPlugins.push([require('@babel/plugin-transform-react-jsx-source')]);
- extraPlugins.push([require('@babel/plugin-transform-react-jsx-self')]);
- }
+ // Skip deprecated jsx-source and jsx-self when using automatic runtime;
+ // automatic runtime already injects __source and __self (avoids "Duplicate __self prop" error).
+ // if (options && options.dev && !options.useTransformReactJSXExperimental) {
+ // extraPlugins.push([require('@babel/plugin-transform-react-jsx-source')]);
+ // extraPlugins.push([require('@babel/plugin-transform-react-jsx-self')]);
+ // }
if (isHermes && enableRegenerator) {
const hasForOf =This issue body was partially generated by patch-package.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type: InvalidThis issue does not belong here. Applying this label will cause issue to be closed.This issue does not belong here. Applying this label will cause issue to be closed.