about summary refs log tree commit diff
path: root/babel.config.js
diff options
context:
space:
mode:
Diffstat (limited to 'babel.config.js')
-rw-r--r--babel.config.js59
1 files changed, 31 insertions, 28 deletions
diff --git a/babel.config.js b/babel.config.js
index fa49ff866..598e2a567 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -1,31 +1,34 @@
-module.exports = {
-  presets: ['module:metro-react-native-babel-preset'],
-  plugins: [
-    [
-      'module:react-native-dotenv',
-      {
-        envName: 'APP_ENV',
-        moduleName: '@env',
-        path: '.env',
-        blocklist: null,
-        allowlist: null,
-        safe: false,
-        allowUndefined: true,
-        verbose: false,
-      },
-    ],
-    [
-      'module-resolver',
-      {
-        alias: {
-          // This needs to be mirrored in tsconfig.json
-          lib: './src/lib',
-          platform: './src/platform',
-          state: './src/state',
-          view: './src/view',
+module.exports = function (api) {
+  api.cache(true)
+  return {
+    presets: ['babel-preset-expo'],
+    plugins: [
+      [
+        'module:react-native-dotenv',
+        {
+          envName: 'APP_ENV',
+          moduleName: '@env',
+          path: '.env',
+          blocklist: null,
+          allowlist: null,
+          safe: false,
+          allowUndefined: true,
+          verbose: false,
+        },
+      ],
+      [
+        'module-resolver',
+        {
+          alias: {
+            // This needs to be mirrored in tsconfig.json
+            lib: './src/lib',
+            platform: './src/platform',
+            state: './src/state',
+            view: './src/view',
+          },
         },
-      },
+      ],
+      'react-native-reanimated/plugin', // NOTE: this plugin MUST be last
     ],
-    'react-native-reanimated/plugin', // NOTE: this plugin MUST be last
-  ],
+  }
 }