forked from topcoder-platform/community-app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.babelrc
71 lines (71 loc) · 1.73 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
// Babel config for NodeJS (server-side). Frontend Babel configuration is embed
// inside Webpack config.
{
"env": {
"development": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[path][name]___[local]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
},
"generateScopedName": "[path][name]___[local]"
}]
]
},
"production": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[hash:base64:6]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
},
"generateScopedName": "[hash:base64:6]"
}]
]
},
"test": {
"plugins": [
["css-modules-transform", {
"extensions": [".css", ".scss"],
"generateScopedName": "[path]___[name]__[local]___[hash:base64:5]"
}],
["react-css-modules", {
"filetypes": {
".scss": {
"syntax": "postcss-scss"
}
}
}]
]
}
},
"presets": ["env", "react", "stage-2"],
"plugins": [
"dynamic-import-node",
"inline-react-svg",
["module-resolver", {
"extensions": [".js", ".jsx"],
"root": [
"./src/shared",
"./src"
],
"transformFunctions": ["resolveWeak"]
}],
["transform-assets", {
"extensions": ["gif", "jpeg", "jpg", "png"],
"name": "/community-app-assets/images/[hash].[ext]"
}],
"transform-runtime"
]
}