Skip to content
This repository has been archived by the owner on Jun 29, 2021. It is now read-only.

Investigate swapping Underscore w/ Lo-Dash or upgrading Underscore #48

Open
vlasky opened this issue Jun 8, 2017 · 9 comments
Open

Comments

@vlasky
Copy link

vlasky commented Jun 8, 2017

Migrated from: meteor/meteor#1009

@mjmasn
Copy link

mjmasn commented Jun 8, 2017

Would be good to see lodash as the default!

@abernix
Copy link
Contributor

abernix commented Jun 8, 2017

(Reposting from my update in meteor/meteor#1009 (comment))

Just as an update on the status of this (important) task...

I did complete the work to replace underscore with lodash in Meteor. The only hesitation to applying that officially was that it actually increased the resulting client-side bundle size by slightly more than we would have liked. This was particularly true since the realization was had during the 1.5-push which was directly focused on decreasing client bundle sizes.

I'm aware of the reasons and I will develop a plan soon to resolve that and get this released. This will be even easier with the bundle-visualizer in Meteor 1.5.

@jdalton
Copy link

jdalton commented Jun 8, 2017

@abernix Awesome! Let me know if you have any questions. There are plugins like babel-plugin-lodash and lodash-webpack-plugin to help reduce bundle size by ensuring modules are cherry-picked or simplified.

@john-osullivan
Copy link

Just looked this up after dealing with a weird bug in my Meteor-React app where the _ token is getting replaced by lodash somewhere in the compilation. Super frustrating having to swap method names because I'm not sure what the token will be set as in different places. Thanks for putting in the dev work to swap Meteor over, @abernix , you the MVP.

@tennox
Copy link

tennox commented Feb 24, 2020

bump 😅

@evolross
Copy link

Why isn't underscore or lodash updated to be like jquery@3.0.0 and simply reference an NPM version? Instead of wrapping such a common package?

If any app has an NPM underscore or lodash dependency, then underscore or lodash would be included twice in the client bundle just like jquery used to be.

Shouldn't we go that route?

@StorytellerCZ
Copy link
Collaborator

StorytellerCZ commented Mar 1, 2020

@evolross I've checked into this and the main blocker with this approach are the modifications that Meteor made to underscore. There seems to be an issue when collections come into the picture.

@derwaldgeist
Copy link

bump

@vlasky
Copy link
Author

vlasky commented May 27, 2020

Can we incorporate @abernix's Meteor lodash enhancements now? It's been almost 3 years since he announced them. Surely the client size bundle size shouldn't be an issue now?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

10 participants