-
Notifications
You must be signed in to change notification settings - Fork 34
/
babel.config.js
46 lines (45 loc) · 1.37 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
const path = require('path');
const env = process.env.BABEL_ENV || process.env.NODE_ENV;
module.exports = function (api) {
api.cache(true);
return {
presets: ['babel-preset-expo'],
plugins: [
[
'@babel/plugin-proposal-decorators',
{
legacy: true,
},
],
[
'@babel/plugin-transform-flow-strip-types',
{
allowDeclareFields: true,
},
],
[
'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'),
},
},
],
['react-native-reanimated/plugin'],
],
};
};