metro-react-native-babel-preset
Advanced tools
Comparing version 0.43.6 to 0.44.0
{ | ||
"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; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
17832
9
33
+ Addedmetro-babel7-plugin-react-transform@0.44.0(transitive)
- Removedmetro-babel7-plugin-react-transform@0.43.6(transitive)