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 {
|
2022-06-01 00:33:59 +02:00
|
|
|
presets: [
|
|
|
|
'babel-preset-expo',
|
|
|
|
[
|
|
|
|
'@babel/preset-react',
|
|
|
|
{
|
|
|
|
importSource: '@welldone-software/why-did-you-render',
|
|
|
|
runtime: 'automatic',
|
|
|
|
development:
|
|
|
|
process.env.NODE_ENV === 'development' ||
|
|
|
|
process.env.BABEL_ENV === 'development'
|
|
|
|
}
|
|
|
|
]
|
|
|
|
],
|
2021-03-13 18:27:44 +01:00
|
|
|
plugins
|
2020-10-23 09:22:17 +02:00
|
|
|
}
|
|
|
|
}
|