Using algorithms like gzip or brotli drastically reduces the size of your assets and can improve the load time of your app – in the case of this blog, by 25%. In this post I am going to explain how to add gzip and brotli compression to an existing webpack setup and serve the compressed files using express.
You are using highlight.js? You noticed that it takes up a huge portion of all your bundle? In this blog post I am going to write about how I brought down the size of this chunk from 750kb and almost 25% of my total bundle size to under 40kb and only about 1.7% by defining which languages should be available to the highlighter.