Skip to content

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

@benmccann benmccann requested a review from Conduitry March 8, 2024 03:46
@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