Open mojavelinux opened 3 months ago
The precompress of content shouldn't be limited to just fonts.
Anything compressible is fair game. Also, while gzip is popular, it's not the only game in town. Brotli and zstd are also increasingly popular choices.
Using the foundation provided by this PR, you should be able to a) compress additional files and b) use a different compression format. See https://nodejs.org/api/zlib.html
Node.js has built-in support for gzip. I added a step to the bundle task that looks for fonts, compresses the contents, and adds a new virtual file to the stream with the .gz file extension so it gets added to the UI bundle.