🚇 The JavaScript bundler for React Native
Installations
npm install metro-react-native-babel-preset
Developer Guide
Typescript
No
Module System
CommonJS
Min. Node Version
>=18
Node Version
18.12.1
NPM Version
8.19.2
Score
84.9
Supply Chain
62.7
Quality
75.8
Maintenance
100
Vulnerability
99.3
License
Releases
Contributors
Languages
JavaScript (99.8%)
SCSS (0.15%)
CSS (0.03%)
TypeScript (0.02%)
Developer
Download Statistics
Total Downloads
416,515,750
Last Day
219,494
Last Week
1,025,960
Last Month
5,090,125
Last Year
99,728,775
GitHub Statistics
5,284 Stars
4,626 Commits
637 Forks
96 Watching
72 Branches
410 Contributors
Bundle Size
2.29 MB
Minified
470.42 kB
Minified + Gzipped
Package Meta Information
Latest Version
0.77.0
Package Id
metro-react-native-babel-preset@0.77.0
Unpacked Size
14.19 kB
Size
4.15 kB
File Count
7
NPM Version
8.19.2
Node Version
18.12.1
Publised On
06 Jul 2023
Total Downloads
Cumulative downloads
Total Downloads
416,515,750
Last day
-18.8%
219,494
Compared to previous day
Last week
-22.5%
1,025,960
Compared to previous week
Last month
-20.2%
5,090,125
Compared to previous month
Last year
-13.5%
99,728,775
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
39
Peer Dependencies
1
metro-react-native-babel-preset
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 babel.config.js
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 babel.config.js
file.
Installation
Install metro-react-native-babel-preset
in your app:
with npm
:
1npm i metro-react-native-babel-preset --save-dev
or with yarn
:
1yarn add -D metro-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 will tell React Native to use your custom Babel configuration instead of its own. Then load this preset:
{
"presets": ["module:metro-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.
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.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
Reason
all changesets reviewed
Reason
no dangerous workflow patterns detected
Reason
30 commit(s) and 2 issue activity found in the last 90 days -- score normalized to 10
Reason
license file detected
Details
- Info: project has a license file: LICENSE:0
- Info: FSF or OSI recognized license: MIT License: LICENSE:0
Reason
no binaries found in the repo
Reason
security policy file detected
Details
- Info: security policy file detected: github.com/facebook/.github/SECURITY.md:1
- Info: Found linked content: github.com/facebook/.github/SECURITY.md:1
- Warn: One or no descriptive hints of disclosure, vulnerability, and/or timelines in security policy
- Info: Found text in security policy: github.com/facebook/.github/SECURITY.md:1
Reason
9 existing vulnerabilities detected
Details
- Warn: Project is vulnerable to: GHSA-jrvm-mcxc-mf6m
- Warn: Project is vulnerable to: GHSA-cg87-wmx4-v546
- Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw
- Warn: Project is vulnerable to: GHSA-fwr7-v2mv-hh25
- Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg
- Warn: Project is vulnerable to: GHSA-3xgq-45jj-v275
- Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c
- Warn: Project is vulnerable to: GHSA-952p-6rrq-rcjv
- Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
no SAST tool detected
Details
- Warn: no pull requests merged into dev branch
Reason
detected GitHub workflow tokens with excessive permissions
Details
- Warn: jobLevel 'contents' permission set to 'write': .github/workflows/deploy-website.yml:18
- Warn: no topLevel permission defined: .github/workflows/build-test-and-deploy.yml:1
- Info: topLevel 'contents' permission set to 'read': .github/workflows/deploy-website.yml:13
- Warn: no topLevel permission defined: .github/workflows/nightly-tests.yml:1
- Warn: no topLevel permission defined: .github/workflows/test.yml:1
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test-and-deploy.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/build-test-and-deploy.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test-and-deploy.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/build-test-and-deploy.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build-test-and-deploy.yml:39: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/build-test-and-deploy.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-website.yml:29: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/deploy-website.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-website.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/deploy-website.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy-website.yml:41: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/deploy-website.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/nightly-tests.yml:40: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/nightly-tests.yml/main?enable=pin
- Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/facebook/metro/test.yml/main?enable=pin
- Info: 0 out of 8 GitHub-owned GitHubAction dependencies pinned
Reason
project is not fuzzed
Details
- Warn: no fuzzer integrations found
Score
5.6
/10
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn MoreOther packages similar to metro-react-native-babel-preset
babel-preset-expo
The Babel preset for Expo projects
@rnx-kit/babel-preset-metro-react-native
Babel preset for React Native applications
@exodus/metro-react-native-babel-preset
Babel preset for React Native applications
@tuofeng/metro-react-native-babel-preset
Babel preset for React Native applications