forked from akveo/kittenTricks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
32 lines (26 loc) · 879 Bytes
/
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
const path = require('path');
const Config = require('./config');
// FIXME: Resolve `transform[stderr]: Could not resolve` command-line warnings.
// FIXME: Reproducible when starting with clearing cache (npm start -- -c)
//
// TODO: Framework path aliasing even not needed here. Replace?
// TODO: Replace nested package.json-s with aliases
const moduleResolverConfig = {
root: path.resolve('./'),
alias: {
'@kitten/theme': path.resolve(Config.KITTEN_PATH, 'theme'),
'@kitten/ui': path.resolve(Config.KITTEN_PATH, 'ui'),
'@eva-design/eva': path.resolve(Config.MAPPING_PATH),
'@eva-design/processor': path.resolve(Config.PROCESSOR_PATH),
},
};
module.exports = function (api) {
api.cache(true);
const presets = [
'babel-preset-expo',
];
const plugins = [
['module-resolver', moduleResolverConfig],
];
return { presets, plugins };
};