-
Notifications
You must be signed in to change notification settings - Fork 36
/
babel.config.js
57 lines (55 loc) · 1 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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
const presets = [
'@babel/preset-typescript',
[
'@babel/preset-react',
{
runtime: 'automatic',
},
],
]
module.exports = {
presets: [
['@babel/preset-env', { targets: { esmodules: true } }],
...presets,
],
plugins: ['babel-plugin-styled-components'],
env: {
test: {
presets: [
['@babel/preset-env', { targets: { node: 'current' } }],
...presets,
],
},
docs: {
presets: [
[
'@babel/preset-env',
{
debug: false,
useBuiltIns: 'usage',
corejs: {
version: 3,
proposals: true,
},
modules: 'commonjs',
targets: {
browsers: [
// Desktop browsers
'last 4 Chrome versions',
'Edge > 15',
'last 4 Firefox versions',
'Firefox ESR',
'last 2 Safari major versions',
// Mobile browsers
'last 2 ChromeAndroid versions',
'last 2 FirefoxAndroid versions',
'last 2 iOS major versions',
],
},
},
],
...presets,
],
},
},
}