forked from szhsin/react-menu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.js
34 lines (34 loc) · 1000 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', ['transform-react-remove-prop-types', { mode: 'unsafe-wrap' }]],
presets: [
[
'@babel/preset-env',
{
bugfixes: true,
include: [
'@babel/plugin-proposal-optional-chaining',
'@babel/plugin-proposal-nullish-coalescing-operator',
'@babel/plugin-proposal-optional-catch-binding'
],
exclude: ['@babel/plugin-transform-typeof-symbol']
}
],
['@babel/preset-react', { runtime: 'automatic' }]
]
};