-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbabel.config.js
28 lines (26 loc) · 1.11 KB
/
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
const plugins = [
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-block-scoped-functions',
'@babel/plugin-transform-block-scoping',
['@babel/plugin-transform-classes', { 'loose': true }],
['@babel/plugin-transform-computed-properties', { 'loose': true }],
['@babel/plugin-transform-destructuring', { 'loose': true }],
['@babel/plugin-transform-for-of', { 'loose': true }],
'@babel/plugin-transform-function-name',
'@babel/plugin-transform-literals',
'@babel/plugin-transform-object-super',
'@babel/plugin-transform-parameters',
'@babel/plugin-transform-shorthand-properties',
['@babel/plugin-transform-spread', { 'loose': true }],
'@babel/plugin-transform-sticky-regex',
['@babel/plugin-transform-template-literals', { 'loose': true }],
'@babel/plugin-transform-unicode-regex',
'@babel/plugin-transform-member-expression-literals',
'@babel/plugin-transform-property-literals'
];
if (process.env.BABEL_ENV === 'commonjs') {
plugins.push(['@babel/plugin-transform-modules-commonjs', { 'loose': true }]);
}
module.exports = {
plugins
};