-
Notifications
You must be signed in to change notification settings - Fork 11
/
babel.config.js
34 lines (34 loc) · 956 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
34
module.exports = {
targets: 'defaults',
assumptions: {
constantReexports: true,
ignoreFunctionLength: true,
ignoreToPrimitiveHint: true,
iterableIsArray: true,
noDocumentAll: true,
noIncompleteNsImportDetection: true,
noNewArrows: true,
objectRestNoSymbols: true,
pureGetters: true,
setComputedProperties: true,
setSpreadProperties: true,
skipForOfIteratorClosing: true
},
shouldPrintComment: (val) => /[@#]__PURE__/.test(val),
plugins: ['pure-annotations'],
presets: [
[
'@babel/preset-env',
{
bugfixes: true,
include: [
'@babel/plugin-transform-nullish-coalescing-operator',
'@babel/plugin-transform-optional-catch-binding'
],
exclude: ['@babel/plugin-transform-typeof-symbol']
}
],
['@babel/preset-react', { runtime: 'automatic' }],
['@babel/preset-typescript', { isTSX: true, allExtensions: true }]
]
};