The official Babel preset for Expo projects, enabling JSX, modern JavaScript, and React Native / web support. Current stable version is 55.0.18. Updated regularly alongside Expo SDK releases. Automatically configures transforms for Expo modules, React Native, and React Native Web. Differentiators: seamless integration with Expo toolchain, automatic platform detection (ios/android/web), and optimized settings for Metro bundler. Requires @babel/runtime and react-refresh for development reloading.
npm install babel-preset-expoVerified import paths — ran on the pinned version, not inferred.
Configures Expo Babel preset in babel.config.js with optional platform override and comments on available options.
Add 'expo-widgets': '^55.0.14' to dependencies, or install expo-widgets
Replace 'lazyImports' with 'rewriteImportPath' in preset options.
For web-only projects, set platform: 'web' explicitly. For React DOM projects, consider using @babel/preset-react instead.
Run npm install @babel/runtime --save (or --save-dev)
Upgrade Babel packages to ^7.12.0 or later.
Run: npm install @babel/runtime
Replace 'transform-remove-console' with 'expo-remove-console' in plugins list.