-
Notifications
You must be signed in to change notification settings - Fork 25
/
babel.config.js
40 lines (40 loc) · 1.27 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
module.exports = {
presets: ["module:@react-native/babel-preset"],
plugins: [
"react-native-worklets-core/plugin",
"transform-inline-environment-variables",
"nativewind/babel",
["module-resolver", {
alias: {
// constants is a reserved word, so jest won't run if we name the alias constants
appConstants: "./src/appConstants",
api: "./src/api",
components: "./src/components",
dictionaries: "./src/dictionaries",
i18n: "./src/i18n",
images: "./src/images",
// for some reason, this doesn't seem to work for models, so I'm leaving that directory out
navigation: "./src/navigation",
providers: "./src/providers",
realmModels: "./src/realmModels",
sharedHelpers: "./src/sharedHelpers",
sharedHooks: "./src/sharedHooks",
stores: "./src/stores",
styles: "./src/styles",
tests: "./tests"
}
}],
// Reanimated plugin has to be listed last https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/installation/
[
"react-native-reanimated/plugin",
{
processNestedWorklets: true
}
]
],
env: {
production: {
plugins: ["react-native-paper/babel", "transform-remove-console"]
}
}
};