-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbabel.config.js
60 lines (58 loc) · 1.43 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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
/** @type {import('ts-jest').JestConfigWithTsJest} */
const ReactCompilerConfig = {
target: '18' // '17' | '18' | '19'
};
module.exports = {
presets: ['module:@react-native/babel-preset'],
plugins: [
'dynamic-import-node',
'babel-plugin-styled-components',
[
'module-resolver',
{
root: ['.'],
extensions: [
'.ios.ts',
'.android.ts',
'.ts',
'.ios.tsx',
'.android.tsx',
'.tsx',
'.jsx',
'.js',
'.json',
'.png',
'.jpeg',
'.jpg',
'.svg',
'webp',
],
alias: {
root: ['./src'],
'@hooks': './src/hooks',
'@navigators': './src/navigators',
'@components': './src/components',
'@redux': './src/redux',
'@store': './src/redux/store',
'@slices': './src/redux/store/slices',
'@env': '.env',
'@assets': './src/assets',
'@services': './src/services',
'@libs': './src/utils/libs',
'@utils': './src/utils',
'@theme': './src/theme',
'@types': './src/utils/types',
},
},
],
'inline-dotenv',
'react-native-reanimated/plugin', // needs to be last
['babel-plugin-react-compiler', ReactCompilerConfig],
],
env: {
development: {},
production: {
plugins: ['transform-remove-console'],
},
},
};