Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instruction for bare react-native projects #288

Merged
merged 1 commit into from
Jan 20, 2024
Merged

Instruction for bare react-native projects #288

merged 1 commit into from
Jan 20, 2024

Conversation

sergeylaptev
Copy link
Contributor

Just successfully got the library for bare react-native (0.73.2) project working again. Unfortunately, the metro-react-native-babel-preset that comes with react-native out of the box does not allow you to change the options of the babel/plugin-transform-react-jsx plugin. Just add the plugin with options as listed below and start react-native packager as usual. Default env for babel is "development". If you do not use expo when working with react-native, the following method will help you:

module.exports = {
  presets: ['module:metro-react-native-babel-preset'],

  env: {
    development: {
      plugins: [['@babel/plugin-transform-react-jsx', { runtime: 'classic' }]],
    },
  },
}
image

This was referenced Jan 20, 2024
@vzaidman vzaidman merged commit 9d2a9c6 into welldone-software:master Jan 20, 2024
@vzaidman
Copy link
Collaborator

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants