Open vlasky opened 7 years ago
Would be good to see lodash
as the default!
(Reposting from my update in https://github.com/meteor/meteor/issues/1009#issuecomment-307090385)
Just as an update on the status of this (important) task...
I did complete the work to replace
underscore
withlodash
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.
@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.
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.
bump :sweat_smile:
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?
@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.
bump
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?
Migrated from: meteor/meteor#1009