my fork of the bluesky client
at main 1.4 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 }, 16 ], 17 ], 18 plugins: [ 19 'macros', 20 ['babel-plugin-react-compiler', {target: '18'}], 21 [ 22 'module:react-native-dotenv', 23 { 24 envName: 'APP_ENV', 25 moduleName: '@env', 26 path: '.env', 27 blocklist: null, 28 allowlist: null, 29 safe: false, 30 allowUndefined: true, 31 verbose: false, 32 }, 33 ], 34 [ 35 'module-resolver', 36 { 37 alias: { 38 // This needs to be mirrored in tsconfig.json 39 '#': './src', 40 lib: './src/lib', 41 platform: './src/platform', 42 state: './src/state', 43 view: './src/view', 44 crypto: './src/platform/crypto.ts', 45 }, 46 }, 47 ], 48 'react-native-reanimated/plugin', // NOTE: this plugin MUST be last 49 ], 50 env: { 51 production: { 52 plugins: ['transform-remove-console'], 53 }, 54 }, 55 } 56}