-
Notifications
You must be signed in to change notification settings - Fork 47
/
babel.config.js
41 lines (38 loc) · 1.17 KB
/
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
38
39
40
41
module.exports = function (api) {
api.cache(true);
const plugins = [
[
"module-resolver",
{
alias: {
"@api": "./mobile-app/app/api",
"@assets": "./shared/assets",
"@constants": "./mobile-app/app/constants",
"@contexts": "./mobile-app/app/contexts",
"@components": "./mobile-app/app/components",
"@hooks": "./mobile-app/app/hooks",
"@shared-api": "./shared/api",
"@shared-contexts": "./shared/contexts",
"@shared-types": "./shared/types",
"@shared-contracts": "./shared/contracts",
"@screens": "./mobile-app/app/screens",
"@store": "./shared/store",
"@translations": "./shared/translations",
"@tailwind": "./mobile-app/app/tailwind",
},
},
],
"@babel/plugin-proposal-export-namespace-from",
"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,
};
};