From 75085a7c7e72d54f72ef8385da83685b7f49c996 Mon Sep 17 00:00:00 2001 From: Maxime Pauvert Date: Wed, 22 Oct 2025 23:17:14 +0200 Subject: [PATCH 1/2] Fix typo in Nuxt internal route check --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 16639cf..5daf03a 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ import { useCompression } from 'h3-compression' export default defineNitroPlugin((nitro) => { nitro.hooks.hook('render:response', async (response, { event }) => { // Skip internal nuxt routes (e.g. error page) - if (getRequestURL(event).pathname.startsWith('/__nuxt')) + if (getRequestURL(event).pathname.startsWith('/_nuxt')) return if (!response.headers?.['content-type']?.startsWith('text/html')) From 009fb8b6b804927f2cc59a0688a8940ebaec7272 Mon Sep 17 00:00:00 2001 From: Maxime Pauvert Date: Thu, 23 Oct 2025 10:33:50 +0200 Subject: [PATCH 2/2] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 5daf03a..1bfbc47 100644 --- a/README.md +++ b/README.md @@ -87,6 +87,9 @@ export default defineNitroPlugin((nitro) => { > [!NOTE] > `useCompressionStream` doesn't work right now in nitro. So you just can use `useCompression` +> [!WARNING] +> Check this issue https://github.com/CodeDredd/h3-compression/issues/10 before using with **Nuxt 4** + ## Utilities H3-compression has a concept of composable utilities that accept `event` (from `eventHandler((event) => {})`) as their first argument and `response` as their second.