transform-react-jsx-source not working on new react-native project
See original GitHub issueIn order to get it to work, I need to create a babelrc
with:
{
"presets": ["react-native"],
"env": {
"development": {
"plugins": ["transform-react-jsx-source"]
}
}
}
Issue Analytics
- State:
- Created 7 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Error when using new 'react-jsx' TypeScript transform #10144
Describe the bug start a vanilla project using the typescript template open any file. you'll see an error like this this: try to...
Read more >Cannot find module '@babel/plugin-transform-react-jsx-source'
Just updated Expo SDK in my app from v32 to v35 and ran into this issue. This solution resolved the issue for me...
Read more >Introducing the New JSX Transform – React Blog
9.0 and above. First, you'll need to update to the latest Babel and plugin transform. Starting from Babel 8, "automatic" will be the...
Read more >babel/plugin-transform-react-jsx
React Classic Runtime createElement . Replace the function used when compiling JSX expressions.
Read more >metro-react-native-babel-preset - npm
js file in your project's root directory, you must specify all the plugins necessary to transform your code. React Native does not apply...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I can recreate this issue in React-Native 0.42, this is still a bug
sorry @thejameskyle :< I wasn’t sure how to respond to that when I saw it and then forgot about it because I just used the fix from the OP. still not really sure how to answer that –
transform-react-jsx-source
is included in the react-native preset, but it doesn’t work unless you add it manually to your babelrc after the preset. not super helpful but it’s all of the context I have a few months after the post