If your project requires a custom Babel configuration, you need to create the babel.config.js file in your project by following the steps below:
npx expo customize
This command prompts generating different config files. Select babel.config.js.
The babel.config.js file is created in the root of your project with the default configuration as shown below:
module.exports = function (api) { api.cache(true); return { presets: ['babel-preset-expo'], }; };