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

Support preCompressed from @fastify/static #1319

Open
1 task done
benmccann opened this issue Mar 4, 2024 · 1 comment
Open
1 task done

Support preCompressed from @fastify/static #1319

benmccann opened this issue Mar 4, 2024 · 1 comment

Comments

@benmccann
Copy link

benmccann commented Mar 4, 2024

Is there an existing issue that is already proposing this?

  • I have searched the existing issues

Is your feature request related to a problem? Please describe it

I have a SvelteKit app where I've set precompress: true to generate .br files. I'd like to serve them from my Nest app.

https://kit.svelte.dev/docs/adapter-static#options-precompress

Describe the solution you'd like

Support https://github.com/fastify/fastify-static?tab=readme-ov-file#precompressed

I thought from a quick glance at the source code that there was a chance the option would be passed straight through, but it didn't work in my testing.

Teachability, documentation, adoption, migration strategy

Add it to the types and docs. It's not there now.

What is the motivation / use case for changing the behavior?

Greatly improves page load time by serving brotli and gzip compressed files

@kamilmysliwiec
Copy link
Member

Would you like to create a PR for this issue?

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

No branches or pull requests

2 participants