I am using metro-react-native-babel-preset
, but I need to exclude @babel/plugin-transform-regenerator
. I tried all sort of things, but nothing works. I suspect that the issue is that metro-react-native-babel-preset
requires the plugin directly, like this:
///node_modules/metro-react-native-babel-preset/src/configs/main.js
plugins: [
...defaultPluginsBeforeRegenerator,
isHermes ? null : require("@babel/plugin-transform-regenerator"),
...defaultPluginsAfterRegenerator
].filter(Boolean)
Is there any way to disable this plugin but keep using the metro preset??
My current config looks like this:
const babelOptions = {presets: [['module:metro-react-native-babel-preset', {exclude: ['regenerator-transform']}]],
module.exports = require('babel-jest').createTransformer(babelOptions);
Thanks!
in latest metro-preset it has been removed