-
Notifications
You must be signed in to change notification settings - Fork 988
/
babel.config.js
40 lines (33 loc) · 1.21 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
const path = require('path');
const env = require('./env');
const frameworkAlias = {
'@eva-design/dss': path.resolve(env.EVA_PACKAGES_PATH, 'dss'),
'@eva-design/eva': path.resolve(env.EVA_PACKAGES_PATH, 'eva'),
'@eva-design/material': path.resolve(env.EVA_PACKAGES_PATH, 'material'),
'@eva-design/processor': path.resolve(env.EVA_PACKAGES_PATH, 'processor'),
'@ui-kitten/components': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components'),
'@ui-kitten/date-fns': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'date-fns'),
'@ui-kitten/eva-icons': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'eva-icons'),
'@ui-kitten/moment': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'moment'),
};
const frameworkInternalAlias = {
'@kitten/theme': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components/theme'),
'@kitten/ui': path.resolve(env.UI_KITTEN_PACKAGES_PATH, 'components/ui'),
};
const moduleResolverConfig = {
root: path.resolve('./'),
alias: {
...frameworkAlias,
...frameworkInternalAlias,
},
};
module.exports = function (api) {
api.cache(true);
const presets = [
'babel-preset-expo',
];
const plugins = [
['module-resolver', moduleResolverConfig],
];
return { presets, plugins };
};