3 ms·
> If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download. Only if each site is usi
by seanwilson 10y ago
> If you just use lodash from a CDN, many, many users will already have it. If you make a custom build, then everyone has to download.
Only if each site is using the exact same version of Lodash which is unlikely. Lodash is tiny anyways.
- madeofpalk 10y agoActually, a full version of loadash is not insignificant.
- jdd 10y agoYou might dig https://github.com/lodash/lodash-webpack-plugin https://github.com/lodash/lodash-webpack-plugin
- madeofpalk 10y agoWe do plenty fine with just `import get from 'lodash/get', however we're fairly eager to upgrade to webpack to to take advantage of it's tree-shaking capabilities.
- jdd 10y agoWebpack 2 or Rollup don't tree-shake Lodash well. You'll need something like https://github.com/lodash/babel-plugin-lodash https://github.com/lodash/babel-plugin-lodash.
- joshstrange 10y agoCore build (~4 kB gzipped) Full build (~22 kB gzipped)
- seanwilson 10y agoCompared to what? I meant in the sense that the full gzipped version wouldn't even be as big as a single small image on a website.