by xiaoma · 10y ago · 0 comments
You might be better off bundling lodash and tree shaking everything you don't actually use away.
But that's just more waiting, and you still end up downloading the ENTIRE script (unless you get REALLY fancy with webpack in a way I don't even want to think about...)
I have a friend who has done, in production, exactly what your subconscious is afraid of. I should get him to do a write up sometime: it's both amazing and horrifying at the same time...
Only if each site is using the exact same version of Lodash which is unlikely. Lodash is tiny anyways.
Full build (~22 kB gzipped)
Especially for those with empty cache (need to make 1 extra DNS request, download 1 extra file, which is mostly unneeded, etc).