-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
37 lines (34 loc) · 941 Bytes
/
babel.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module.exports = function (api) {
api.cache(true)
const plugins = [
[
'module-resolver',
{
alias: {
'@api': './mobile-app/api',
'@assets': './assets',
'@constants': './mobile-app/constants',
'@contexts': './mobile-app/contexts',
'@components': './mobile-app/components',
'@environment': './environment',
'@hooks': './mobile-app/hooks',
'@types': './types',
'@screens': './mobile-app/screens',
'@store': './mobile-app/store',
'@tailwind': './mobile-app/tailwind'
}
}
],
'react-native-reanimated/plugin'
]
if (process.env.CYPRESS_E2E) {
plugins.push('istanbul')
}
if (process.env.NODE_ENV === 'production') {
plugins.push(['transform-remove-console', { 'exclude': ['error', 'warn'] }])
}
return {
presets: ['babel-preset-expo'],
plugins: plugins
}
}