forked from Minds/mobile-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
48 lines (47 loc) · 1.34 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
const path = require('path');
const env = process.env.BABEL_ENV || process.env.NODE_ENV;
module.exports = {
presets: [
[
'module:metro-react-native-babel-preset',
// { disableImportExportTransform: env !== 'test' },
],
],
plugins: [
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
[
'@babel/plugin-transform-flow-strip-types',
{
allowDeclareFields: true,
},
],
['react-native-reanimated/plugin'],
[
'module-resolver',
{
extensions: ['.js', '.jsx', '.ts', '.tsx'],
root: ['.'],
alias: {
'@assets': ['./assets'],
'~': ['./src/'],
'~ui': ['./src/common/ui'],
'~styles': ['./src/styles'],
// 'ReactNativeRenderer-prod':
// './node_modules/react-native/Libraries/Renderer/implementations/ReactNativeRenderer-profiling',
// 'scheduler/tracing': 'scheduler/tracing-profiling',
app: path.resolve(__dirname, 'src/app'),
components: path.resolve(__dirname, 'src/components'),
modules: path.resolve(__dirname, 'src/modules'),
services: path.resolve(__dirname, 'src/services'),
styles: path.resolve(__dirname, 'src/styles'),
utils: path.resolve(__dirname, 'src/utils'),
},
},
],
],
};