I get the following error when I want to build my APK.
Export namespace should be first transformed by
@babel/plugin-proposal-export-namespace-from
I need to say that I have imported react-native-gesture-handler
in the index.js
and this is my index.js
import 'react-native-gesture-handler';
import {AppRegistry} from 'react-native';
import App from './app/App';
import {name as appName} from './app.json';
import { LogBox } from 'react-native';
LogBox.ignoreAllLogs();
AppRegistry.registerComponent(appName, () => App);
during development mode, I did not get that error.
I really appreciate any help you can provide.
CodePudding user response:
You have to add the 'react-native-reanimated/plugin'
to the plugins array.
make sure this Plugin should be the last.
open the babel.config.js in the root of your project and modify it as follow:
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: [
'react-native-reanimated/plugin',
],
};
NOTE: make sure that you have installed npm install react-native-reanimated
CodePudding user response:
Your babel.config.js should look like
module.exports = {
presets: ['module:metro-react-native-babel-preset'],
plugins: ['react-native-reanimated/plugin'],
};