Brotli Compression Makes Static Website Assets Significantly Smaller

Brotli is a compression algorithm developed by Google that is supported by all modern browsers. It can compress files more than gzip (usually ~20% smaller) and seems to better compress large JavaScript files. In my local tests with brotli compression set at 11 a 1.2MB js file was compressed to ~260KB.

This can help make large JavaScript bundles smaller and counteract js toolchains trading off ease of adding dependencies for bundle size.