Socket
Socket
Sign inDemoInstall

metro-react-native-babel-preset

Package Overview
Dependencies
Maintainers
1
Versions
100
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

metro-react-native-babel-preset - npm Package Compare versions

Comparing version 0.43.6 to 0.44.0

src/plugins.js.flow

4

package.json
{
"name": "metro-react-native-babel-preset",
"version": "0.43.6",
"version": "0.44.0",
"description": "Babel preset for React Native applications",

@@ -50,4 +50,4 @@ "main": "src/index.js",

"@babel/template": "7.0.0-beta.56",
"metro-babel7-plugin-react-transform": "0.43.6"
"metro-babel7-plugin-react-transform": "0.44.0"
}
}

@@ -21,5 +21,6 @@ # metro-react-native-babel-preset

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": ["metro-react-native-babel-preset"]
"presets": ["module:metro-react-native-babel-preset"]
}

@@ -26,0 +27,0 @@ ```

@@ -12,7 +12,7 @@ /**

/**
* Manually resolve all default Babel plugins.
* `babel.transform` will attempt to resolve all base plugins relative to
* the file it's compiling. This makes sure that we're using the plugins
* installed in the react-native package.
*/
* Manually resolve all default Babel plugins.
* `babel.transform` will attempt to resolve all base plugins relative to
* the file it's compiling. This makes sure that we're using the plugins
* installed in the react-native package.
*/
function resolvePlugins(plugins, prefix) {

@@ -23,4 +23,4 @@ return plugins.map(plugin => resolvePlugin(plugin, prefix));

/**
* Manually resolve a single Babel plugin.
*/
* Manually resolve a single Babel plugin.
*/
function resolvePlugin(plugin) {let prefix = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '@babel/plugin-';

@@ -27,0 +27,0 @@ // Normalise plugin to an array.

@@ -15,13 +15,13 @@ /**

/**
* Transforms function properties of the `Symbol` into
* the presence check, and fallback string "@@<name>".
*
* Example:
*
* Symbol.iterator;
*
* Transformed to:
*
* typeof Symbol.iterator === 'function' ? Symbol.iterator : '@@iterator';
*/
* Transforms function properties of the `Symbol` into
* the presence check, and fallback string "@@<name>".
*
* Example:
*
* Symbol.iterator;
*
* Transformed to:
*
* typeof Symbol === 'function' ? Symbol.iterator : '@@iterator';
*/
module.exports = function symbolMember(babel) {

@@ -28,0 +28,0 @@ const t = babel.types;

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc