You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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)
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) I don't think its worth using for
async at this point as it'll most likely significantly increase build size.
See #996 for history.
On Mon, May 16, 2016 at 4:35 PM, John-David Dalton ***@***.*** > wrote:
Cool. If you all ever pick up webpack it might be worth checking it. It's
tackles the hassle and know-how out of cherry-picking internals.
—
You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
0a2cc39#commitcomment-17494254
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 😸
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.
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.
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.
0a2cc39
There was a problem hiding this comment.
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?
0a2cc39
There was a problem hiding this comment.
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)
0a2cc39
There was a problem hiding this comment.
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.
0a2cc39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
0a2cc39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 😸
0a2cc39
There was a problem hiding this comment.
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 ofasync
that's 9.4 kB compared to the current 10.81 kB.0a2cc39
There was a problem hiding this comment.
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 ofrest
that didn't includetoInteger
.0a2cc39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lodash-webpack-plugin
takes care of that. Combo'ed withbabel-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.0a2cc39
There was a problem hiding this comment.
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?
0a2cc39
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep. It should actually simplify your build a bit.
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.0a2cc39
There was a problem hiding this comment.
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.