-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbabel.config.js
33 lines (32 loc) · 1003 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
module.exports = function (api) {
const development = api.env('development');
const loose = true;
const legacy = true;
return {
presets: [
['@babel/preset-env', {
targets: {
node: 'current'
},
}],
['@babel/preset-typescript'],
],
plugins: [
['@babel/plugin-transform-runtime'],
['@babel/plugin-transform-async-to-generator'],
['@babel/plugin-transform-spread', { loose }],
['@babel/plugin-proposal-decorators', { legacy }],
['@babel/plugin-proposal-class-properties', { loose }],
['@babel/plugin-proposal-optional-chaining', { loose }],
['@babel/plugin-transform-template-literals', { loose }],
['@babel/plugin-transform-object-assign'],
['@babel/plugin-transform-arrow-functions'],
['@babel/plugin-transform-typescript'],
['@babel/plugin-proposal-object-rest-spread', {
useBuiltIns: 'usage',
loose: true,
}],
],
comments: development,
}
}