generated at
babel-preset-expo
Expo向けのBabelのPresets
RNのdefault presetsである@react-native/babel-presetの拡張
Expoに限らず任意のRNプロジェクトで使用できる



decoratorのサポート
基本これがメインみたい
>あなたのプロジェクトがネイティブのフォント読み込みやウェブサポートを使用していない場合、このプリセットは @babel/plugin-proposal-decorators でデコレータのサポートのみを追加します ref
Webパッケージのtree shaking
font iconの読み込み
など



options
react-compiler
babel-plugin-react-compilerに設定を渡すためのオプション
特定のファイル名に基づいてReact Compilerを適用できる
Expo v51以降では、 app.json experiments.reactCompiler true にする必要がある
minifyTypeofWindow
window オブジェクトの typeof チェックを最小化する設定
特にネイティブアプリやサーバー環境で役立る
reanimated
react-native-reanimatedプラグインを追加する設定
デフォルトで有効。
jsxRuntime
JSXをJSに自動変換する設定
内部で@babel/plugin-transform-react-jsxに渡される
以下の2つ
classic
automatic (default)
JSXをJSに自動変換する
各ファイルでimport React from "react"を書く必要がない
jsxImportSource
JSXのインポートソースを指定するオプション
defaultは react
lazyImports
import文を初めて使用するときに遅延評価する
アプリの初期ロード時間を短縮するのに役立つ
なんか色々条件があるので、使うときはdocs参照
disableImportExportTransform
import/export module.exports に変換するのを無効化する
unstable_transformProfile
ターゲットとするJavaScriptエンジンに基づいてプリセットを変更する設定
Expo v50以降ではapp.jsonのjsEngineに基づいて自動設定される
enableBabelRuntime
@react-native/babel-presetに渡される設定
disableFlowStripTypesTransform
@react-native/babel-presetに渡される設定