forked from samwi/collab-ui-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc.js
38 lines (37 loc) · 947 Bytes
/
.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
const commonjs = process.env.BABEL_ENV !== 'esm';
module.exports = {
presets: [
[
'@babel/preset-env',
{
loose: true,
shippedProposals: true,
modules: commonjs ? 'commonjs' : false,
targets: {
browsers: ['last 4 versions', 'not ie <= 8']
},
useBuiltIns: 'usage'
}
],
[
'@babel/preset-react',
{ development: process.env.NODE_ENV !== 'production' }
]
],
plugins: [
[
"module-resolver",
{
"alias": {
"@collab-ui/react": "./src/lib"
}
}
],
['@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'
].filter(Boolean)
};