Working collection of bundle-shaving tips
- Dominant language
- JavaScript
- Stars
- 2.9k
- Forks
- 289
- PR merge metrics
- No merged PRs in 30d
Description
After including `lodash-webpack-plugin` and `babel-plugin-lodash` in `.babelrc` and `webpack.config.js` with no extra configuration, my build time went down by ~2 seconds and vendor file shrunk from 538 kB to 504 kB
Small, but figured it was worth sharing!
Related to #290
Edit: It was mentioned in #313 that lodash was already being trimmed by using `/function` in the imports, but I guess these packages do some extra work on top of that.
Edit: When using `redux-form` I saved 31kb more by using `babel-plugin-transform-imports` as described [here](https://redux-form.com/7.2.3/docs/faq/bundlesize.md/#babel-plugin).
I've renamed this issue so I can continue sharing any more optimizations I find :)
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.