Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

compress fonts and add them to UI bundle #56

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mojavelinux
Copy link
Contributor

No description provided.

@mojavelinux
Copy link
Contributor Author

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.

@joakime
Copy link
Contributor

joakime commented Jun 25, 2024

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.

@mojavelinux
Copy link
Contributor Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants