forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.babelrc
32 lines (32 loc) · 1.04 KB
/
.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
28
29
30
31
32
{
presets: [
"@babel/preset-env",
"@babel/preset-react",
// The "all" property is needed for Flow to properly parse the syntax. It has
// trouble understanding when the flow comment is the second comment.
// See: https://github.com/babel/babel/issues/9845
["@babel/preset-flow", { all: true }]
],
plugins: [
// Without `loose`, the transformation uses `Object.defineProperty` which
// obeys the spec more, but we get a bundle that's 8kB larger. That was the
// default in babel v6.
["@babel/plugin-proposal-class-properties", { loose: true }],
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }],
"syntax-dynamic-import"
],
env: {
test: {
presets: [
"@babel/preset-env",
"@babel/preset-react",
["@babel/preset-flow", { all: true }]
],
plugins: [
["@babel/plugin-proposal-class-properties", { loose: true }],
["@babel/plugin-proposal-object-rest-spread", { useBuiltIns: true }],
"dynamic-import-node"
],
}
}
}