-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbabel.config.js
More file actions
32 lines (31 loc) · 1.02 KB
/
babel.config.js
File metadata and controls
32 lines (31 loc) · 1.02 KB
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
const debug = (process.env.NODE_ENV || '').trim() !== 'production';
module.exports = {
presets: [
[
'@babel/env',
{
targets: {
browsers: ['last 2 versions'] //['chrome >= 60', 'firefox ESR', 'edge > 13', 'safari >= 10', 'ie >= 11']
},
corejs: 2,
loose: true,
modules: false,
useBuiltIns: 'entry',
debug: false
}
],
'@babel/react'
],
plugins: [
['@babel/transform-runtime', { corejs: 2 }],
'react-html-attrs',
'transform-class-properties',
'@babel/proposal-json-strings',
'@babel/proposal-object-rest-spread',
'@babel/proposal-optional-catch-binding',
'@babel/proposal-unicode-property-regex',
'@babel/syntax-bigint',
'@babel/syntax-dynamic-import',
'@babel/transform-async-to-generator'
].concat(debug ? [] : ['@babel/transform-react-inline-elements'])
};