-
Notifications
You must be signed in to change notification settings - Fork 26
/
babel.config.js
39 lines (38 loc) · 1005 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
35
36
37
38
39
const plugins = [
'@babel/plugin-transform-flow-strip-types',
['@babel/plugin-proposal-class-properties', { loose: true }],
'@babel/plugin-proposal-json-strings',
'@babel/plugin-proposal-object-rest-spread',
'@babel/plugin-transform-template-literals',
'@babel/plugin-transform-literals',
'@babel/plugin-transform-function-name',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-block-scoping',
[
'@babel/plugin-transform-classes',
{
loose: true, // spits out cleaner and faster output
},
],
'@babel/plugin-transform-destructuring',
'@babel/plugin-transform-spread',
]
module.exports = {
plugins,
env: {
development: {
plugins,
},
production: {
plugins: [
...plugins,
// 'minify-flip-comparisons',
// 'minify-guarded-expressions',
// 'minify-dead-code-elimination',
],
},
test: {
plugins: [...plugins, '@babel/plugin-transform-modules-commonjs'],
},
},
}