babel-preset-react-native
Preset Babel plugins for React Native applications
Last updated 9 years ago by ide .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ npm install babel-preset-react-native 
SYNC missed versions from official npm registry.

This Project Is Deprecated

babel-preset-react-native has been replaced by metro-react-native-babel-preset, which now uses Babel 7.0.0. If you're using React Native v0.57 or later you should update your babel config to point to the metro-react-native-babel-preset preset.

babel-preset-react-native

Babel presets for React Native applications. React Native itself uses this Babel preset by default when transforming your app's source code.

If you wish to use a custom Babel configuration by writing a .babelrc file in your project's root directory, you must specify all the plugins necessary to transform your code. React Native does not apply its default Babel configuration in this case. So, to make your life easier, you can use this preset to get the default configuration and then specify more plugins that run before it.

Usage

As mentioned above, you only need to use this preset if you are writing a custom .babelrc file.

Installation

Install babel-preset-react-native in your app:

npm i babel-preset-react-native --save-dev

Configuring Babel

Then, create a file called .babelrc in your project's root directory. The existence of this .babelrc file will tell React Native to use your custom Babel configuration instead of its own. Then load this preset:

{
  "presets": ["react-native"]
}

You can further customize your Babel configuration by specifying plugins and other options. See Babel's .babelrc documentation to learn more.

Help and Support

If you get stuck configuring Babel, please ask a question on Stack Overflow or find a consultant for help. If you discover a bug, please open up an issue.

Current Tags

  • 4.0.1                                ...           latest (6 years ago)
  • 5.0.2                                ...           next (6 years ago)

38 Versions

  • 4.0.1                                ...           6 years ago
  • 5.0.2                                ...           6 years ago
  • 5.0.1                                ...           6 years ago
  • 5.0.0                                ...           7 years ago
  • 4.0.0                                ...           7 years ago
  • 3.0.2                                ...           7 years ago
  • 2.0.1                                ...           7 years ago
  • 3.0.2-rc.0                                ...           7 years ago
  • 3.0.1                                ...           7 years ago
  • 3.0.0                                ...           7 years ago
  • 2.1.0                                ...           7 years ago
  • 2.0.0                                ...           7 years ago
  • 1.9.2                                ...           8 years ago
  • 1.9.1                                ...           8 years ago
  • 1.9.0                                ...           8 years ago
  • 1.8.0                                ...           9 years ago
  • 1.7.0                                ...           9 years ago
  • 1.6.0                                ...           9 years ago
  • 1.5.7                                ...           9 years ago
  • 1.5.6                                ...           9 years ago
  • 1.5.5                                ...           9 years ago
  • 1.5.3                                ...           9 years ago
  • 1.5.2                                ...           9 years ago
  • 1.5.1                                ...           9 years ago
  • 1.5.0                                ...           9 years ago
  • 1.4.0                                ...           9 years ago
  • 1.4.0-alpha                                ...           9 years ago
  • 1.3.0                                ...           9 years ago
  • 1.2.4                                ...           9 years ago
  • 1.2.2                                ...           9 years ago
  • 1.2.1                                ...           9 years ago
  • 1.2.0                                ...           9 years ago
  • 1.1.0                                ...           9 years ago
  • 1.0.0                                ...           9 years ago
  • 0.3.0                                ...           9 years ago
  • 0.2.1                                ...           9 years ago
  • 0.2.0                                ...           9 years ago
  • 0.1.0                                ...           9 years ago
Maintainers (2)
Downloads
Total 9
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 9
Dev Dependencies (0)
None

© 2010 - cnpmjs.org x YWFE | Home | YWFE