Skip to content

Commit f19c06b

Browse files
committed
➕ Add babel-plugin-emotion
1 parent 23da82e commit f19c06b

File tree

3 files changed

+29
-4
lines changed

3 files changed

+29
-4
lines changed

.babelrc

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"env": {
3+
"production": {
4+
"plugins": [
5+
[ "emotion", { "hoist": true } ]
6+
]
7+
},
8+
"development": {
9+
"plugins": [
10+
["emotion", { "sourceMap": true, "autoLabel": true }]
11+
]
12+
}
13+
}
14+
}

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@
7979
"babel-cli": "^6.26.0",
8080
"babel-core": "6.26.3",
8181
"babel-eslint": "^8.2.3",
82+
"babel-plugin-emotion": "^9.2.6",
8283
"babel-plugin-transform-class-properties": "^6.24.1",
8384
"babel-plugin-transform-object-rest-spread": "^6.26.0",
8485
"babel-plugin-transform-react-jsx": "^6.24.1",

src/.babelrc

+14-4
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,26 @@
22
"env": {
33
"modules": {
44
"plugins": [
5-
"transform-es2015-modules-commonjs"
5+
"transform-es2015-modules-commonjs",
6+
[ "emotion", { "hoist": true } ]
7+
]
8+
},
9+
"production": {
10+
"plugins": [
11+
[ "emotion", { "hoist": true } ]
12+
]
13+
},
14+
"development": {
15+
"plugins": [
16+
["emotion", { "sourceMap": true }]
617
]
718
}
819
},
920
"presets": [
1021
[ "env", {
11-
"modules": false,
1222
"useBuiltIns": true,
13-
"loose": true,
14-
"exclude": [ "transform-regenerator" ]
23+
"modules": false,
24+
"loose": true
1525
} ]
1626
],
1727
"plugins": [

0 commit comments

Comments
 (0)