forked from momentum-design/momentum-react-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc.js
43 lines (42 loc) · 1.09 KB
/
.babelrc.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
const commonjs = process.env.BABEL_ENV !== 'esm';
module.exports = {
presets: [
[
'@babel/preset-env',
{
loose: true,
shippedProposals: true,
modules: commonjs ? 'commonjs' : false,
targets: {
browsers: [
'>0.25%',
'ie >= 11',
'not op_mini all' // opera mini doesn't support client side
]
}
}
],
[
'@babel/preset-react',
{ development: process.env.NODE_ENV !== 'production' }
],
'@babel/preset-typescript'
],
plugins: [
[
"module-resolver",
{
"alias": {
"@momentum-ui/react-collaboration": "./src/legacy"
}
}
],
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-export-default-from',
'@babel/plugin-proposal-export-namespace-from',
'@babel/plugin-transform-react-constant-elements'
['@babel/plugin-transform-runtime', { useESModules: !commonjs }],
'babel-plugin-dev-expression',
'@babel/plugin-proposal-optional-chaining'
].filter(Boolean)
};