To be honest, optimising a Webpack bundle is probably one of the most annoying things I have to do as a Software Engineer.
Some resources to help you with it:
- To understand why something is being bundled:
whybundlednpm package. This requires generating Webpack stats with
- To debug production deployments:
npx bundle-wizard https://example.com
- Chrome DevTools Coverage: useful to know how bad your code coverage usage is.
Good luck with this not-so-nice-but-quite-important task!