status-web-archive/apps/mobile/babel.config.js

40 lines
1015 B
JavaScript
Raw Normal View History

2023-01-11 13:38:47 +00:00
module.exports = function (api) {
api.cache(true)
return {
presets: [['babel-preset-expo', { jsxRuntime: 'automatic' }]],
plugins: [
[
require.resolve('babel-plugin-module-resolver'),
{
root: ['../..'],
alias: {
// define aliases to shorten the import paths
'@status-im/components': '../../packages/components',
},
extensions: ['.js', '.jsx', '.tsx', '.ios.js', '.android.js'],
},
],
// if you want reanimated support
// 'react-native-reanimated/plugin',
...(process.env.EAS_BUILD_PLATFORM === 'android'
? []
: [
[
'@tamagui/babel-plugin',
{
components: ['@status-im/components'],
config: './tamagui.config.ts',
},
],
]),
[
'transform-inline-environment-variables',
{
include: 'TAMAGUI_TARGET',
},
],
],
}
}