-
Notifications
You must be signed in to change notification settings - Fork 2
/
.babelrc
48 lines (43 loc) · 1.4 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
41
42
43
44
45
46
47
48
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript"
],
"plugins": [
// Reuse babel's injected headers
"@babel/plugin-transform-runtime",
// Polyfill
["polyfill-corejs3", {
"method": "usage-global"
}],
["polyfill-regenerator", {
"method": "usage-global"
}],
// Handle absolute imports
["babel-plugin-module-resolver", {
"root": ["."],
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"alias": {
"#generated": "./generated",
"#components": "./app/components",
"#views": "./app/views",
"#resources": "./app/resources",
"#base": "./app/Base",
"#ts": "./app/translate",
"#gqlFragments": "./app/gqlFragments",
"#redirects": "./app/redirects",
"#utils": "./app/utils",
"#hooks": "./app/hooks",
"#types": "./app/types"
}
}],
// Extends javascript support
"@babel/plugin-syntax-dynamic-import",
// Extends react support
"@babel/plugin-transform-react-constant-elements",
// "@babel/plugin-transform-react-inline-elements",
// Extends graphql support
"babel-plugin-graphql-tag"
]
}