-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathbabel.config.js
34 lines (32 loc) · 930 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
33
34
const config = {
sourceType: 'unambiguous',
presets: ['@babel/preset-env', '@babel/preset-react'],
plugins: [
['@babel/plugin-proposal-class-properties', { loose: true }],
[
'@babel/plugin-proposal-object-rest-spread',
{
loose: true,
},
],
'@babel/plugin-transform-object-assign',
'@babel/plugin-transform-runtime',
['@babel/plugin-proposal-decorators', { legacy: true }],
],
};
/* istanbul ignore else */
if (process.env.NODE_ENV !== 'production' || process.env.STORYBOOK_BUILD === 'production') {
config.plugins.push([
'babel-plugin-module-resolver',
{
root: ['./'],
alias: {
'@kuveytturk/boa-base': './packages/base/src',
'@kuveytturk/boa-components': './packages/components/src',
'@kuveytturk/boa-utils': './packages/utils/src',
'@kuveytturk/boa-test': './test',
},
},
]);
}
module.exports = config;