deer social fork for personal usage. but you might see a use idk. github mirror
at main 1.3 kB view raw
1module.exports = function (api) { 2 api.cache(true) 3 const isTestEnv = process.env.NODE_ENV === 'test' 4 return { 5 presets: [ 6 [ 7 'babel-preset-expo', 8 { 9 lazyImports: true, 10 native: { 11 // Disable ESM -> CJS compilation because Metro takes care of it. 12 // However, we need it in Jest tests since those run without Metro. 13 disableImportExportTransform: !isTestEnv, 14 }, 15 unstable_transformImportMeta: true, 16 }, 17 ], 18 ], 19 plugins: [ 20 'macros', 21 ['babel-plugin-react-compiler', {target: '19'}], 22 [ 23 'module:react-native-dotenv', 24 { 25 envName: 'APP_ENV', 26 moduleName: '@env', 27 path: '.env', 28 blocklist: null, 29 allowlist: null, 30 safe: false, 31 allowUndefined: true, 32 verbose: false, 33 }, 34 ], 35 [ 36 'module-resolver', 37 { 38 alias: { 39 // This needs to be mirrored in tsconfig.json 40 '#': './src', 41 crypto: './src/platform/crypto.ts', 42 }, 43 }, 44 ], 45 'react-native-reanimated/plugin', // NOTE: this plugin MUST be last 46 ], 47 env: { 48 production: { 49 plugins: ['transform-remove-console'], 50 }, 51 }, 52 } 53}