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

remove compression middleware from adapter-node output server #5506

Merged
merged 2 commits into from
Jul 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/slimy-ways-applaud.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@sveltejs/adapter-node': patch
---

[breaking] remove compression middleware from adapter-node output server
2 changes: 0 additions & 2 deletions packages/adapter-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,8 @@
"devDependencies": {
"@rollup/plugin-json": "^4.1.0",
"@sveltejs/kit": "workspace:*",
"@types/compression": "^1.7.2",
"@types/node": "^16.11.36",
"c8": "^7.11.3",
"compression": "^1.7.4",
"node-fetch": "^3.2.4",
"polka": "^1.0.0-next.22",
"rimraf": "^3.0.2",
Expand Down
8 changes: 1 addition & 7 deletions packages/adapter-node/src/index.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,12 @@
import { handler } from './handler.js';
import { env } from './env.js';
import compression from 'compression';
import polka from 'polka';

export const path = env('SOCKET_PATH', false);
export const host = env('HOST', '0.0.0.0');
export const port = env('PORT', !path && '3000');

const server = polka().use(
// https://github.com/lukeed/polka/issues/173
// @ts-ignore - nothing we can do about so just ignore it
compression({ threshold: 0 }),
handler
);
const server = polka().use(handler);

server.listen({ path, host, port }, () => {
console.log(`Listening on ${path ? path : host + ':' + port}`);
Expand Down
115 changes: 0 additions & 115 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.