-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc
46 lines (41 loc) · 1.33 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
{
"presets": [
"@babel/preset-env",
"@babel/preset-react",
"@babel/preset-typescript",
],
"plugins": [
// Reuse babel's injected headers
"@babel/plugin-transform-runtime",
// Handle absolute imports
["babel-plugin-module-resolver", {
"root": ["."],
"extensions": [".js", ".jsx", ".ts", ".tsx"],
"alias": {
"#generated": "./generated",
"#components": "./app/components",
"#utils": "./app/utils",
"#resources": "./app/resources",
"#views": "./app/views",
"#base": "./app/Base",
"#hooks": "./app/hooks"
},
}],
// Extends javascript support
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-proposal-do-expressions",
// Extends react support
"@babel/plugin-transform-react-constant-elements",
// "@babel/plugin-transform-react-inline-elements",
// Extends graphql support
'babel-plugin-graphql-tag',
// NOTE: we may not need to install these as well
// Polyfill
["polyfill-corejs3", {
"method": "usage-global",
}],
["polyfill-regenerator", {
"method": "usage-global",
}],
],
}