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

breaking: apply @polka/compression middleware #11952

Closed
wants to merge 1 commit into from
Closed

Conversation

benmccann
Copy link
Member

closes #9593

We used to apply the compression middleware. However, that middleware is incompatible with streaming and has blocked users from filing issues or sending PRs to the repo. The newly available @polka/compression middleware addresses those concerns

This could be merged together with #11945 and #11653 as part of a new major release for adapter-node

Copy link

changeset-bot bot commented Mar 8, 2024

🦋 Changeset detected

Latest commit: 61312bc

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sveltejs/adapter-node Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@Conduitry
Copy link
Member

I don't think this is a good idea to apply unconditionally, and probably not even by default. There are more efficient solutions to use than Node for compressing your responses on the fly - and ones that won't directly compete with your app for CPU time on Node's single thread. Unless you're serving unencrypted HTTP to users, you're going to have some sort of reverse proxy sitting in front of your application anyway.

@benmccann
Copy link
Member Author

Great points! I'll close this and send a docs PR instead

@benmccann benmccann closed this Mar 8, 2024
@benmccann benmccann deleted the compression branch March 8, 2024 15:33
@benmccann
Copy link
Member Author

I've sent the docs PR in #11957

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

Successfully merging this pull request may close these issues.

Add support for compression
2 participants