Skip to content
This repository was archived by the owner on May 19, 2025. It is now read-only.

Commit dfbca28

Browse files
authored
Merge pull request #429 from onionhammer/babel-plugin-to-reduce-imports
Use babel-plugin-date-fns to reduce bundle size
2 parents 8968cb8 + 3ec8013 commit dfbca28

File tree

4 files changed

+9
-1
lines changed

4 files changed

+9
-1
lines changed

.babelrc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
],
66
"plugins": [
77
["@babel/plugin-proposal-class-properties"],
8-
["@babel/plugin-proposal-export-default-from"]
8+
["@babel/plugin-proposal-export-default-from"],
9+
"date-fns"
910
]
1011
}
1112

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ node_modules/
66
lib/
77
NOTES.txt
88
styleguide/
9+
dist/

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@
5656
"autoprefixer": "^9.7.3",
5757
"babel-eslint": "^10.0.3",
5858
"babel-loader": "^8.0.6",
59+
"babel-plugin-date-fns": "^2.0.0",
5960
"css-loader": "^3.2.0",
6061
"date-fns": "^2.8.1",
6162
"enzyme": "^3.11.0",

yarn.lock

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,6 +1696,11 @@ babel-loader@^8.0.6:
16961696
mkdirp "^0.5.1"
16971697
pify "^4.0.1"
16981698

1699+
babel-plugin-date-fns@^2.0.0:
1700+
version "2.0.0"
1701+
resolved "https://registry.yarnpkg.com/babel-plugin-date-fns/-/babel-plugin-date-fns-2.0.0.tgz#56074f1b4659c3b1208b5d156d4f51612d7af620"
1702+
integrity sha512-MbsQzEgglAIBZLQbKQDgMUgFDwf7sSHXgaWRXowiEVs1B+eiBge4JnhBQtIaHIVLE9QmXfDQbb18oggvP7KSFQ==
1703+
16991704
babel-plugin-dynamic-import-node@^2.3.0:
17001705
version "2.3.0"
17011706
resolved "https://registry.yarnpkg.com/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.0.tgz#f00f507bdaa3c3e3ff6e7e5e98d90a7acab96f7f"

0 commit comments

Comments
 (0)