From 9b5297cd75e7b7a7fdcc2c3d7c9105de0e4295bd Mon Sep 17 00:00:00 2001 From: Tomasz Lesniakiewicz Date: Wed, 21 Jan 2026 13:55:37 +0100 Subject: [PATCH 1/5] cleanup platform specifics from hermes build --- babel.config.js | 2 +- metro.config.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/babel.config.js b/babel.config.js index f262c5454a7c..6eced7d75d36 100644 --- a/babel.config.js +++ b/babel.config.js @@ -65,7 +65,7 @@ const webpack = { }; const metro = { - presets: [require('@react-native/babel-preset')], + presets: [[require('@react-native/babel-preset'), {disableImportExportTransform: true}]], plugins: [ ['babel-plugin-react-compiler', ReactCompilerConfig], // must run first! diff --git a/metro.config.js b/metro.config.js index 59479c07b374..757bf2448576 100644 --- a/metro.config.js +++ b/metro.config.js @@ -37,6 +37,7 @@ const config = { transformer: { getTransformOptions: async () => ({ transform: { + experimentalImportSupport: true, inlineRequires: true, }, }), From e9c217bbaa7e7032e191dfa9851517293b768a2a Mon Sep 17 00:00:00 2001 From: Tomasz Lesniakiewicz Date: Wed, 21 Jan 2026 15:45:10 +0100 Subject: [PATCH 2/5] fix jest tests --- babel.config.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/babel.config.js b/babel.config.js index 6eced7d75d36..374ab6122fda 100644 --- a/babel.config.js +++ b/babel.config.js @@ -177,5 +177,13 @@ module.exports = (api) => { const runningIn = api.caller((args = {}) => args.name); console.debug(' - running in: ', runningIn); + const isJest = runningIn === 'babel-jest'; + if (isJest) { + return { + ...metro, + presets: [[require('@react-native/babel-preset'), {disableImportExportTransform: false}]], + }; + } + return ['metro', 'babel-jest'].includes(runningIn) ? metro : webpack; }; From 4df5ea20fe1fc16fe9030ad57aaccdbf0c25509d Mon Sep 17 00:00:00 2001 From: Tomasz Lesniakiewicz Date: Fri, 23 Jan 2026 16:30:41 +0100 Subject: [PATCH 3/5] remove expo config from metro config --- metro.config.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/metro.config.js b/metro.config.js index 757bf2448576..00260226bfcf 100644 --- a/metro.config.js +++ b/metro.config.js @@ -1,4 +1,3 @@ -const {getDefaultConfig: getExpoDefaultConfig} = require('expo/metro-config'); const {getDefaultConfig: getReactNativeDefaultConfig} = require('@react-native/metro-config'); const {mergeConfig} = require('@react-native/metro-config'); @@ -13,7 +12,6 @@ const envPath = process.env.ENVFILE ? (path.isAbsolute(process.env.ENVFILE) ? pr require('dotenv').config({path: envPath}); const defaultConfig = getReactNativeDefaultConfig(__dirname); -const expoConfig = getExpoDefaultConfig(__dirname); const isE2ETesting = process.env.E2E_TESTING === 'true'; const e2eSourceExts = ['e2e.js', 'e2e.ts', 'e2e.tsx']; @@ -49,6 +47,8 @@ const config = { : {}, }; -const mergedConfig = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, expoConfig, config)); +// const mergedConfig = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, expoConfig, config)); +const mergedConfig = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, config)); +console.log('🔧 METRO CONFIG: config =', config); module.exports = isDev ? mergedConfig : withSentryConfig(mergedConfig); From 4548e4b97535a838ae82a5e66591c1040b8efdbe Mon Sep 17 00:00:00 2001 From: Tomasz Lesniakiewicz Date: Fri, 23 Jan 2026 16:31:37 +0100 Subject: [PATCH 4/5] change android entry point to not use expo --- android/app/src/main/java/com/expensify/chat/MainApplication.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/src/main/java/com/expensify/chat/MainApplication.kt b/android/app/src/main/java/com/expensify/chat/MainApplication.kt index d8bb98d5dc2b..852fdf4a2838 100644 --- a/android/app/src/main/java/com/expensify/chat/MainApplication.kt +++ b/android/app/src/main/java/com/expensify/chat/MainApplication.kt @@ -42,7 +42,7 @@ class MainApplication : MultiDexApplication(), ReactApplication { add(NavBarManagerPackage()) } - override fun getJSMainModuleName() = ".expo/.virtual-metro-entry" + override fun getJSMainModuleName() = "index" override val isNewArchEnabled: Boolean get() = BuildConfig.IS_NEW_ARCHITECTURE_ENABLED From 8feec1c4b000284780e29c7c119c0def7e945784 Mon Sep 17 00:00:00 2001 From: Tomasz Lesniakiewicz Date: Fri, 23 Jan 2026 18:10:05 +0100 Subject: [PATCH 5/5] cleanup --- metro.config.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/metro.config.js b/metro.config.js index 00260226bfcf..ab54c066f6bd 100644 --- a/metro.config.js +++ b/metro.config.js @@ -47,8 +47,6 @@ const config = { : {}, }; -// const mergedConfig = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, expoConfig, config)); const mergedConfig = wrapWithReanimatedMetroConfig(mergeConfig(defaultConfig, config)); -console.log('🔧 METRO CONFIG: config =', config); module.exports = isDev ? mergedConfig : withSentryConfig(mergedConfig);