forked from firefox-devtools/profiler
-
Notifications
You must be signed in to change notification settings - Fork 0
/
babel.config.json
73 lines (73 loc) · 2.19 KB
/
babel.config.json
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
{
"presets": [
[
"@babel/preset-env",
{
// Allow `@babel/preset-env` to import polyfills from core-js as needed.
"useBuiltIns": "usage",
// Help `@babel/preset-env` make use of the correct core-js polyfills.
"corejs": "3.9",
// Perform transforms closest to targets defined in `.browserslistrc`.
"bugfixes": true
}
],
[
"@babel/preset-react",
{
// When spreading props, use inline object with spread elements
// directly instead of Babel's `extend` helper or `Object.assign`.
"useSpread": true
}
],
// 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": [
// Though `@babel/plugin-transform-class-properties` is already included
// in `@babel/preset-env`, we include it specifically to be able to set
// `loose` mode on it, without enabling it for all the plugins included
// in `@babel/preset-env`.
[
"@babel/plugin-transform-class-properties",
{
// 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.
"loose": true
}
],
[
"@babel/plugin-transform-private-methods",
{
// Like `plugin-transform-class-properties`, `loose` option is being used
// inside of this plugin as well. These plugins must have the same value,
// therefore it's set to true here.
"loose": true
}
],
[
"@babel/plugin-transform-private-property-in-object",
{
// Like `plugin-transform-class-properties`, `loose` option is being used
// inside of this plugin as well. These plugins must have the same value,
// therefore it's set to true here.
"loose": true
}
],
[
"module-resolver",
{
"alias": {
"firefox-profiler": "./src"
}
}
]
]
}