diff --git a/packages/metro-react-native-babel-preset/package.json b/packages/metro-react-native-babel-preset/package.json index e082134db3..a808119132 100644 --- a/packages/metro-react-native-babel-preset/package.json +++ b/packages/metro-react-native-babel-preset/package.json @@ -38,7 +38,6 @@ "@babel/plugin-transform-destructuring": "^7.0.0", "@babel/plugin-transform-exponentiation-operator": "^7.0.0", "@babel/plugin-transform-flow-strip-types": "^7.0.0", - "@babel/plugin-transform-for-of": "^7.0.0", "@babel/plugin-transform-function-name": "^7.0.0", "@babel/plugin-transform-literals": "^7.0.0", "@babel/plugin-transform-modules-commonjs": "^7.0.0", diff --git a/packages/metro-react-native-babel-preset/src/configs/main.js b/packages/metro-react-native-babel-preset/src/configs/main.js index 59dfac38be..0a9feda995 100644 --- a/packages/metro-react-native-babel-preset/src/configs/main.js +++ b/packages/metro-react-native-babel-preset/src/configs/main.js @@ -43,8 +43,6 @@ const getPreset = (src, options) => { const isNull = src == null; const hasClass = isNull || src.indexOf('class') !== -1; - const hasForOf = - isNull || (src.indexOf('for') !== -1 && src.indexOf('of') !== -1); const extraPlugins = []; if (!options.useTransformReactJSXExperimental) { @@ -125,12 +123,6 @@ const getPreset = (src, options) => { require('@babel/plugin-transform-exponentiation-operator'), ]); } - if (!isHermes && hasForOf) { - extraPlugins.push([ - require('@babel/plugin-transform-for-of'), - {loose: true}, - ]); - } if ( isNull || src.indexOf('React.createClass') !== -1 ||