generated from andreidmt/tpl-react
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc
40 lines (33 loc) · 1.2 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
38
39
40
{
"presets": [
// Use the latest JavaScript without needing to micromanage which syntax
// transforms and browser polyfills are needed by your target environment.
//
// Uses .browserslistrc to specify target environments.
"@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",
// Babel uses very small helpers for common functions such as _extend. By
// default this will be added to every file that requires it. This
// duplication is sometimes unnecessary, especially when your application
// is spread out over multiple files.
"@babel/plugin-transform-runtime",
// Add displayName to React.createClass calls
"@babel/plugin-transform-react-display-name"
],
"env": {
"development": {
"plugins": [
"react-refresh/babel"
],
},
}
}