Skip to content
This repository was archived by the owner on Jun 20, 2022. It is now read-only.

Commit 1bce9cb

Browse files
authored
Merge pull request #42 from smooth-code/tree-shaking
perf: improve tree shaking
2 parents ee4c0d5 + fc07a34 commit 1bce9cb

File tree

3 files changed

+14
-1
lines changed

3 files changed

+14
-1
lines changed

babel.config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ const getStyledEnginePlugins = () => {
55
case 'emotion':
66
return ['babel-plugin-emotion']
77
case 'styled-components':
8-
return []
8+
return ['babel-plugin-styled-components']
99
default:
1010
return []
1111
}
@@ -29,6 +29,7 @@ const config = {
2929
],
3030
},
3131
],
32+
'babel-plugin-annotate-pure-calls',
3233
'@babel/plugin-proposal-object-rest-spread',
3334
['@babel/plugin-proposal-class-properties', { loose: true }],
3435
],

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,9 @@
5454
"babel-eslint": "^9.0.0",
5555
"babel-jest": "^23.4.2",
5656
"babel-loader": "^8.0.2",
57+
"babel-plugin-annotate-pure-calls": "^0.3.0",
5758
"babel-plugin-emotion": "^9.2.8",
59+
"babel-plugin-styled-components": "^1.6.4",
5860
"babel-plugin-transform-rename-import": "^2.3.0",
5961
"bundlesize": "^0.17.0",
6062
"conventional-github-releaser": "^3.1.2",

yarn.lock

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1560,6 +1560,10 @@ babel-messages@^6.23.0:
15601560
dependencies:
15611561
babel-runtime "^6.22.0"
15621562

1563+
babel-plugin-annotate-pure-calls@^0.3.0:
1564+
version "0.3.0"
1565+
resolved "https://registry.yarnpkg.com/babel-plugin-annotate-pure-calls/-/babel-plugin-annotate-pure-calls-0.3.0.tgz#7f0ec500432506a94ff878d6425dce9d043f6902"
1566+
15631567
babel-plugin-emotion@^9.2.8:
15641568
version "9.2.8"
15651569
resolved "https://registry.yarnpkg.com/babel-plugin-emotion/-/babel-plugin-emotion-9.2.8.tgz#4df55ef10625c391f25b031f7e3006abac359e09"
@@ -1604,6 +1608,12 @@ babel-plugin-react-docgen@^2.0.0:
16041608
lodash "^4.17.10"
16051609
react-docgen "^3.0.0-rc.1"
16061610

1611+
babel-plugin-styled-components@^1.6.4:
1612+
version "1.6.4"
1613+
resolved "https://registry.yarnpkg.com/babel-plugin-styled-components/-/babel-plugin-styled-components-1.6.4.tgz#24677e5b37a85b04aed855a5f81f1c7bfec77784"
1614+
dependencies:
1615+
lodash "^4.17.10"
1616+
16071617
babel-plugin-syntax-dynamic-import@^6.18.0:
16081618
version "6.18.0"
16091619
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-dynamic-import/-/babel-plugin-syntax-dynamic-import-6.18.0.tgz#8d6a26229c83745a9982a441051572caa179b1da"

0 commit comments

Comments
 (0)