-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc
37 lines (31 loc) · 1.03 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
33
34
35
36
37
{
"presets": [
// Use the latest JavaScript without needing to micromanage which syntax
// transforms (and optionally, browser polyfills) are needed by your
// target environment.
//
// Uses .browserslistrc to determine what plugins to use.
"@babel/preset-env",
// Load React specific plugins
"@babel/preset-react"
],
"plugins": [
// Can speed up reconciliation and reduce garbage collection pressure
// by hoisting React elements to the highest possible scope,
// preventing multiple unnecessary reinstantiations.
"@babel/plugin-transform-react-constant-elements",
// Remove data-test-id attributes from your production builds.
"babel-plugin-jsx-remove-data-test-id",
// Enables the re-use of Babel's injected helper code to save on codesize
"@babel/plugin-transform-runtime",
// Add displayName to React.createClass calls
"@babel/plugin-transform-react-display-name"
],
"env": {
"development": {
"plugins": [
"react-refresh/babel"
]
}
}
}