Skip to content

Commit e36cb59

Browse files
authored
fix: prefer nitro.static over _generate (#11)
1 parent 54555fa commit e36cb59

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/utils/configuration.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,8 @@ export function configure(ctx: HttpClientHintsContext, nuxt: Nuxt) {
5151
}
5252
}
5353

54-
const clientOnly = nuxt.options._generate || !nuxt.options.ssr
54+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
55+
const clientOnly = nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */ || !nuxt.options.ssr
5556

5657
// we register the client detector only if needed and not in SSR mode
5758
if ((options.detectBrowser || options.detectOS || resolvedOptions.userAgent.length) && clientOnly) {

0 commit comments

Comments
 (0)