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

feat: enable compression #903

Merged
merged 6 commits into from
Sep 27, 2024
Merged

feat: enable compression #903

merged 6 commits into from
Sep 27, 2024

Conversation

sarat1669
Copy link
Contributor

@sarat1669 sarat1669 commented Sep 26, 2024

Text compression is not enabled in hono.
When we run a light house score on the sample app generated, we get 95 score.
Screenshot 2024-09-26 at 16 09 15

Enabling compression along with the meta description fix in #904 gives 100/100.

Copy link

vercel bot commented Sep 26, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
waku ✅ Ready (Inspect) Visit Preview Sep 27, 2024 6:54am

Copy link

codesandbox-ci bot commented Sep 26, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@dai-shi
Copy link
Owner

dai-shi commented Sep 26, 2024

Hi, can you add the PR description with some details?

@sarat1669 sarat1669 mentioned this pull request Sep 26, 2024
@dai-shi
Copy link
Owner

dai-shi commented Sep 26, 2024

Thanks for the suggestion!

Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you make a change?

@@ -144,6 +145,7 @@ async function runStart() {
import(pathToFileURL(path.resolve(distDir, DIST_ENTRIES_JS)).toString());
const app = new Hono();
app.use(contextStorage());
app.use(compress())
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like a good addition, it's not 100% certain if this won't cause any issues for all users.
So, my suggestion is to introduce a new option --experimental-compress and use it explicitly.
We can also enable it for the dev server too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Owner

@dai-shi dai-shi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
Thanks for your contribution!

@dai-shi dai-shi merged commit 67ede80 into dai-shi:main Sep 27, 2024
28 checks passed
@sarat1669 sarat1669 deleted the patch-1 branch September 27, 2024 15:04
dai-shi added a commit that referenced this pull request Oct 7, 2024
Description meta tags used in the scaffolded apps is wrong as per Google
Light House.

`<meta property="description" content="The minimal React framework" />`
Should be 
`<meta name="description" content="The minimal React framework" />`

This along with #903 gives perfect light house score

Co-authored-by: daishi <[email protected]>
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

Successfully merging this pull request may close these issues.

2 participants