-
Notifications
You must be signed in to change notification settings - Fork 30
/
babel.config.js
43 lines (42 loc) · 1.36 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
module.exports = (api) => {
api.cache(false);
const config = {
presets: [
[
'@babel/preset-env',
{
exclude: [
'@babel/plugin-transform-async-to-generator',
'@babel/plugin-transform-regenerator',
'@babel/plugin-transform-typeof-symbol',
'@babel/plugin-transform-computed-properties',
'@babel/plugin-transform-destructuring',
],
targets: [
'last 1 version',
'> 1%',
// ie 11 is dead and no longer supported
'not dead',
'chrome >= 55',
'firefox >= 52',
'edge >= 15',
'opera >= 42',
'safari >= 13',
],
},
],
[
'@babel/preset-typescript',
{
optimizeConstEnums: true,
},
],
],
plugins: [
'@babel/plugin-transform-runtime',
'@babel/plugin-transform-arrow-functions',
'@babel/plugin-transform-function-name',
],
};
return config;
};