Skip to content

Commit

Permalink
Fixes #1158; update lodash dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
megawac committed May 16, 2016
1 parent 5a9bbe5 commit 0a2cc39
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions package.json
Expand Up @@ -18,8 +18,8 @@
"utility"
],
"dependencies": {
"lodash": "^4.3.0",
"lodash-es": "^4.3.0"
"lodash": "^4.8.0",
"lodash-es": "^4.8.0"
},
"devDependencies": {
"babel-cli": "^6.3.17",
Expand Down

11 comments on commit 0a2cc39

@jdalton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have y'all looked into lodash-webpack-plugin?

@megawac
Copy link
Collaborator Author

@megawac megawac commented on 0a2cc39 May 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware of it, but we're not using webpack and would prefer to cherry-pick internals ourselves (to ensure we don't include deep path functionality and other stuff we don't need)

@jdalton
Copy link
Contributor

@jdalton jdalton commented on 0a2cc39 May 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool. If you all ever pick up webpack it might be worth checking out.
It takes the hassle and know-how out of cherry-picking internals.

@megawac
Copy link
Collaborator Author

@megawac megawac commented on 0a2cc39 May 16, 2016 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jdalton
Copy link
Contributor

@jdalton jdalton commented on 0a2cc39 May 16, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless it can figure out how to remove the unused bloat (i.e. reduce a call
down to the internal implementations)

That's essentially what it does. It looks like there's a few things it doesn't cover yet (I'll patch it), but it could totally reduce the number of times you need to explicitly dip into internals by a good amount.

I'll make an experiment out of adding it to see how it effects the bundle size 😸

@jdalton
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So in my experiment using lodash-webpack-plugin generates a build of async that's 9.4 kB compared to the current 10.81 kB.

@aearly
Copy link
Collaborator

@aearly aearly commented on 0a2cc39 May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was going to ask where you were getting 10.8 kB from, seeing as our build used to be 6.4 kB, but it appears later versions of Lodash include more stuff for the subset we are using. A lot seems to be coming from baseIsEqualDeep. I'd also like to use a version of rest that didn't include toInteger.

@jdalton
Copy link
Contributor

@jdalton jdalton commented on 0a2cc39 May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A lot seems to be coming from baseIsEqualDeep. I'd also like to use a version of rest that didn't include toInteger.

lodash-webpack-plugin takes care of that. Combo'ed with babel-plugin-lodash you get smaller builds, simpler import statements, and avoid manually dipping into internal modules. I'm easing into a PR by getting some cleanup PRs done first.

@aearly
Copy link
Collaborator

@aearly aearly commented on 0a2cc39 May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we'd have to use Webpack instead of Rollup?

How small a build could we get by slicing out some internals?

@jdalton
Copy link
Contributor

@jdalton jdalton commented on 0a2cc39 May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean we'd have to use Webpack instead of Rollup?

Yep. It should actually simplify your build a bit.

How small a build could we get by slicing out some internals?

My build was 9.4 kB. The lodash-webpack-plugin is still getting pretty regular updates, to make builds even smaller, so I imagine that size can be reduced further.

@aearly
Copy link
Collaborator

@aearly aearly commented on 0a2cc39 May 31, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cool, I look forward to seeing what your PR looks like.

Please sign in to comment.