metro-react-native-babel-preset
Advanced tools
Comparing version 0.51.1 to 0.52.0
{ | ||
"name": "metro-react-native-babel-preset", | ||
"version": "0.51.1", | ||
"version": "0.52.0", | ||
"description": "Babel preset for React Native applications", | ||
@@ -29,2 +29,3 @@ "main": "src/index.js", | ||
"@babel/plugin-syntax-export-default-from": "^7.0.0", | ||
"@babel/plugin-syntax-flow": "^7.2.0", | ||
"@babel/plugin-transform-arrow-functions": "^7.0.0", | ||
@@ -55,3 +56,3 @@ "@babel/plugin-transform-block-scoping": "^7.0.0", | ||
"@babel/template": "^7.0.0", | ||
"metro-babel7-plugin-react-transform": "0.51.1", | ||
"metro-babel7-plugin-react-transform": "0.52.0", | ||
"react-transform-hmr": "^1.0.4" | ||
@@ -58,0 +59,0 @@ }, |
@@ -52,6 +52,5 @@ /** | ||
const defaultPlugins = [ | ||
[require("@babel/plugin-syntax-flow")], | ||
[require("@babel/plugin-proposal-optional-catch-binding")], | ||
[require("@babel/plugin-transform-block-scoping")], // the flow strip types plugin must go BEFORE class properties! | ||
// there'll be a test case that fails if you don't. | ||
[require("@babel/plugin-transform-flow-strip-types")], | ||
[require("@babel/plugin-transform-block-scoping")], | ||
[ | ||
@@ -146,5 +145,2 @@ require("@babel/plugin-proposal-class-properties"), // use `this.foo = bar` instead of `this.defineProperty('foo', ...)` | ||
if (!options || !options.lazyCommonJS) { | ||
} | ||
if (hasClass) { | ||
@@ -207,2 +203,10 @@ extraPlugins.push(es2015Classes); | ||
let flowPlugins = {}; | ||
if (!options || !options.disableFlowStripTypesTransform) { | ||
flowPlugins = { | ||
plugins: [require("@babel/plugin-transform-flow-strip-types")] | ||
}; | ||
} | ||
return { | ||
@@ -212,2 +216,5 @@ comments: false, | ||
overrides: [ | ||
// the flow strip types plugin must go BEFORE class properties! | ||
// there'll be a test case that fails if you don't. | ||
flowPlugins, | ||
{ | ||
@@ -214,0 +221,0 @@ plugins: defaultPlugins |
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
13692
345
37
+ Addedmetro-babel7-plugin-react-transform@0.52.0(transitive)
- Removedmetro-babel7-plugin-react-transform@0.51.1(transitive)