question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

transform-react-jsx-source not working on new react-native project

See original GitHub issue

In 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:closed
  • Created 7 years ago
  • Comments:10 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
DaleLJeffersoncommented, Mar 30, 2017

I can recreate this issue in React-Native 0.42, this is still a bug

0reactions
brentvatnecommented, Nov 14, 2016

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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found