-
Notifications
You must be signed in to change notification settings - Fork 6
/
.babelrc
27 lines (27 loc) · 909 Bytes
/
.babelrc
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
{
"env": {
"test": {
"presets": [
["@babel/preset-env", { "modules": "cjs" }],
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
"@babel/plugin-transform-regenerator",
"@babel/plugin-transform-runtime",
"@babel/plugin-proposal-class-properties"
]
},
"build": {
"plugins": [
"babel-plugin-typescript-to-proptypes",
// Due to the DTS build process, some aspects of the tsconfig don't match the
// actual build result, specifically --downlevelIteration. This is due to their use of babel
// over vanilla tsc. Due to this non-array iterators aren't properly transpiled when using
// spread syntax. This plugin allows the use of spread syntax on non-array iterators.
// E.G: [...new Set(myArray)]
"@babel/plugin-transform-spread"
]
},
}
}