1
0
mirror of https://github.com/tooot-app/app synced 2024-12-12 17:18:45 +01:00
tooot/babel.config.js

36 lines
731 B
JavaScript
Raw Normal View History

2020-10-23 09:22:17 +02:00
module.exports = function (api) {
api.cache(true)
2021-03-13 18:27:44 +01:00
const plugins = [
'@babel/plugin-proposal-optional-chaining',
[
'module-resolver',
{
root: ['./'],
alias: {
'@assets': './assets',
'@root': './src',
'@api': './src/api',
2021-05-12 15:40:55 +02:00
'@helpers': './src/helpers',
2021-03-13 18:27:44 +01:00
'@components': './src/components',
'@screens': './src/screens',
'@utils': './src/utils'
}
}
],
'react-native-reanimated/plugin'
]
if (
process.env.NODE_ENV === 'production' ||
process.env.BABEL_ENV === 'production'
) {
plugins.push('transform-remove-console')
}
2020-10-20 10:28:42 +02:00
return {
2020-11-22 01:13:13 +01:00
presets: ['babel-preset-expo'],
2021-03-13 18:27:44 +01:00
plugins
2020-10-23 09:22:17 +02:00
}
}