Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Working collection of bundle-shaving tips #336

Open
vegeta897 opened this issue Feb 5, 2018 · 0 comments
Open

Working collection of bundle-shaving tips #336

vegeta897 opened this issue Feb 5, 2018 · 0 comments

Comments

@vegeta897
Copy link

vegeta897 commented Feb 5, 2018

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.

I've renamed this issue so I can continue sharing any more optimizations I find :)

@vegeta897 vegeta897 changed the title Include lodash-webpack-plugin and babel-plugin-lodash for slightly leaner builds Working collection of bundle-shaving tips Feb 13, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant