From c4df59d78545db9af28b76f057a6a6d5931f445a Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Wed, 11 Jun 2025 14:17:25 +0200 Subject: [PATCH 1/2] fix: prefer `nitro.static` over `_generate` --- src/utils/configuration.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/configuration.ts b/src/utils/configuration.ts index 04285e4..7ffa645 100644 --- a/src/utils/configuration.ts +++ b/src/utils/configuration.ts @@ -51,7 +51,7 @@ export function configure(ctx: HttpClientHintsContext, nuxt: Nuxt) { } } - const clientOnly = nuxt.options._generate || !nuxt.options.ssr + const clientOnly = nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */ || !nuxt.options.ssr // we register the client detector only if needed and not in SSR mode if ((options.detectBrowser || options.detectOS || resolvedOptions.userAgent.length) && clientOnly) { From f1cf97928bde1b878d1bd8c1fff180e615eb9080 Mon Sep 17 00:00:00 2001 From: Daniel Roe Date: Thu, 12 Jun 2025 06:07:39 +0100 Subject: [PATCH 2/2] chore: suppress lint --- src/utils/configuration.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/utils/configuration.ts b/src/utils/configuration.ts index 7ffa645..bd88b15 100644 --- a/src/utils/configuration.ts +++ b/src/utils/configuration.ts @@ -51,6 +51,7 @@ export function configure(ctx: HttpClientHintsContext, nuxt: Nuxt) { } } + // eslint-disable-next-line @typescript-eslint/no-explicit-any const clientOnly = nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */ || !nuxt.options.ssr // we register the client detector only if needed and not in SSR mode