1
0
mirror of https://github.com/tooot-app/app synced 2024-12-22 15:49:42 +01:00
tooot/babel.config.js

27 lines
612 B
JavaScript
Raw Normal View History

2020-10-23 09:22:17 +02:00
module.exports = function (api) {
2022-12-23 17:47:01 +01:00
api.cache(false)
2021-03-13 18:27:44 +01:00
2022-12-24 14:46:39 +01:00
const plugins = [
'@babel/plugin-proposal-optional-chaining',
[
'module-resolver',
{
root: ['./'],
alias: {
'@components': './src/components',
'@i18n': './src/i18n',
2022-12-24 14:46:39 +01:00
'@screens': './src/screens',
'@utils': './src/utils'
}
}
],
'react-native-reanimated/plugin'
]
2022-12-23 17:47:01 +01:00
if (process.env.NODE_ENV === 'production' || process.env.BABEL_ENV === 'production') {
2021-03-13 18:27:44 +01:00
plugins.push('transform-remove-console')
}
2022-12-24 14:46:39 +01:00
return { presets: ['babel-preset-expo'], plugins }
2020-10-23 09:22:17 +02:00
}