Skip to content

Commit 550cece

Browse files
authored
docs: Typo in Nuxt internal route check + add nuxt 4 warning
Fix typo in Nuxt internal route check + add nuxt 4 warning
2 parents 1c11789 + 009fb8b commit 550cece

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ import { useCompression } from 'h3-compression'
7474
export default defineNitroPlugin((nitro) => {
7575
nitro.hooks.hook('render:response', async (response, { event }) => {
7676
// Skip internal nuxt routes (e.g. error page)
77-
if (getRequestURL(event).pathname.startsWith('/__nuxt'))
77+
if (getRequestURL(event).pathname.startsWith('/_nuxt'))
7878
return
7979

8080
if (!response.headers?.['content-type']?.startsWith('text/html'))
@@ -87,6 +87,9 @@ export default defineNitroPlugin((nitro) => {
8787
> [!NOTE]
8888
> `useCompressionStream` doesn't work right now in nitro. So you just can use `useCompression`
8989
90+
> [!WARNING]
91+
> Check this issue https://github.com/CodeDredd/h3-compression/issues/10 before using with **Nuxt 4**
92+
9093
## Utilities
9194

9295
H3-compression has a concept of composable utilities that accept `event` (from `eventHandler((event) => {})`) as their first argument and `response` as their second.

0 commit comments

Comments
 (0)