-
Notifications
You must be signed in to change notification settings - Fork 1.4k
/
babel.config.js
36 lines (36 loc) · 1.33 KB
/
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
35
36
module.exports = {
presets: [
"@babel/react",
[
"@babel/env",
{
// targets are defined in .browserslistrc
useBuiltIns: "entry",
// This should be kept up to date with thee version in package.json
corejs: "3.24.1",
// We care more about perf than exactly conforming to the spec
loose: true,
exclude: [
// These exist since forever but end up being polyfilled anyway because of an obscure issue if length is not writeable
"es.array.push",
"es.array.unshift"
],
// Enable to sse resolved targets and polyfills being used
debug: false
}
],
"@babel/typescript"
],
plugins: [
// TODO: When i18n build pipeline is finished move to: [ "react-intl", { "removeDefaultMessage": true } ]
"react-intl",
["@babel/proposal-class-properties", { loose: true }],
["@babel/plugin-proposal-private-property-in-object", { loose: true }],
["@babel/plugin-proposal-private-methods", { loose: true }],
"@babel/proposal-object-rest-spread",
// Samsung Internet on the Oculus Go version is stuck at version 5.2, which is a
// Chromium 51, as of this writing. It needs babel to transpile async/await.
"@babel/plugin-transform-async-to-generator",
"@babel/plugin-proposal-optional-chaining"
]
};