Skip to content

Commit

Permalink
test: Added @polka/compression to observe how it affects Progressiv…
Browse files Browse the repository at this point in the history
…e Rendering when a page contains many meta tags.
  • Loading branch information
phonzammi committed Sep 6, 2024
1 parent aa83492 commit ce75a06
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
3 changes: 3 additions & 0 deletions express-entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { fileURLToPath } from "node:url";

import express from "express";
import { renderPage } from "vike/server";
import compression from "@polka/compression";

const __filename = fileURLToPath(import.meta.url);
const __dirname = dirname(__filename);
Expand All @@ -17,6 +18,8 @@ export default (await startServer()) as unknown;
async function startServer() {
const app = express();

app.use(compression());

if (process.env.NODE_ENV === "production") {
app.use(express.static(`${root}/dist/client`));
} else {
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"vite": "^5.4.2"
},
"dependencies": {
"@polka/compression": "1.0.0-next.25",
"cross-env": "^7.0.3",
"express": "^4.19.2",
"solid-js": "^1.8.22",
Expand Down
9 changes: 9 additions & 0 deletions pnpm-lock.yaml

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

0 comments on commit ce75a06

Please sign in to comment.