Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
feat(gatsby): add better splitchunks config #17093
Creates a basic splitChunks config that works better than our current one. It's not the final config we would like as that one needs more testing. This one works pretty well so far.
Credits go to Nextjs as I copied the code from their codebase.
We want to go to a granular way of splitting chunks like nextjs does https://github.com/zeit/next.js/blob/canary/packages/next/build/webpack-config.ts#L217-L275 but create one that works for Gatsby.
This PR saves around 400kb on .org and lowers visual-complete and TTI (fist-cpu-idle) by 400ms which will lower even more when guess-js is fixed.
Comparison can be found here: