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

Commit

Permalink
Install babel-plugin-lodash
Browse files Browse the repository at this point in the history
The entire lodash bundle is 600kB or so.  We're only using a couple functions.  This plugin transforms import statements such that we don't get all the extra wasted code.

See: https://github.com/lodash/babel-plugin-lodash
  • Loading branch information
ajhyndman committed Sep 8, 2017
1 parent 222b87a commit 33a158b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 1 deletion.
1 change: 1 addition & 0 deletions package.json
Expand Up @@ -25,6 +25,7 @@
"devDependencies": {
"babel-core": "^6.23.1",
"babel-loader": "^7.0.0",
"babel-plugin-lodash": "^3.2.11",
"babel-plugin-transform-object-rest-spread": "^6.23.0",
"babel-preset-es2015-native-modules": "^6.9.4",
"babel-preset-stage-2": "^6.22.0",
Expand Down
3 changes: 2 additions & 1 deletion src/.babelrc
@@ -1,3 +1,4 @@
{
"presets": ["es2015", "stage-2"]
"presets": ["es2015", "stage-2"],
"plugins": ["lodash"]
}
7 changes: 7 additions & 0 deletions yarn.lock
Expand Up @@ -464,6 +464,13 @@ babel-plugin-check-es2015-constants@^6.22.0:
dependencies:
babel-runtime "^6.22.0"

babel-plugin-lodash@^3.2.11:
version "3.2.11"
resolved "https://registry.yarnpkg.com/babel-plugin-lodash/-/babel-plugin-lodash-3.2.11.tgz#21c8fdec9fe1835efaa737873e3902bdd66d5701"
dependencies:
glob "^7.1.1"
lodash "^4.17.2"

babel-plugin-minify-builtins@^0.0.2:
version "0.0.2"
resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.0.2.tgz#f3be6121763c0c518d5ef82067cef4b615c9498c"
Expand Down

0 comments on commit 33a158b

Please sign in to comment.