🎩 You're Invited:Meet the Socket team at Black Hat in Las Vegas, August 3-6.RSVP
Sign In

@react-native/babel-preset

Package Overview
Dependencies
Maintainers
2
Versions
1127
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@react-native/babel-preset

Babel preset for React Native applications

Source
npmnpm
Version
0.87.0-rc.2
Version published
Weekly downloads
9.8M
7.31%
Maintainers
2
Weekly downloads
 
Created
Source

@react-native/babel-preset

npm npm downloads

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

You only need to use this preset directly if you provide a custom babel.config.js file in your project's root directory. React Native does not apply its default Babel configuration in that case, so you must specify all the plugins necessary to transform your code — start from this preset to get the defaults and add more plugins on top.

Usage

Installation

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

with npm:

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

or with yarn:

yarn add -D @react-native/babel-preset

Configuring Babel

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

{
  "presets": ["module:@react-native/babel-preset"]
}

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

Keywords

babel

FAQs

Package last updated on 20 Jul 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts