Skip to content

Commit 7a57033

Browse files
authored
fix: prefer nitro.static over _generate (#372)
1 parent bb0ce16 commit 7a57033

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/compatibility.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ export function resolveNitroPreset(nitroConfig?: NitroConfig): string {
113113
if (nuxt.options.dev)
114114
return 'nitro-dev'
115115
// check for prerendering
116-
if (nuxt.options._generate)
116+
if ((nuxt.options as any)_generate /* TODO: remove in future major */ || nuxt.options.nitro.static)
117117
return 'nitro-prerender'
118118
let preset
119119
if (nitroConfig && nitroConfig?.preset)

src/kit.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,5 +61,5 @@ export {}
6161
}
6262

6363
export function isNuxtGenerate(nuxt: Nuxt = useNuxt()) {
64-
return nuxt.options._generate || nuxt.options.nitro.static || nuxt.options.nitro.preset === 'static'
64+
return (nuxt.options as any)_generate /* TODO: remove in future major */ || nuxt.options.nitro.static || nuxt.options.nitro.preset === 'static'
6565
}

0 commit comments

Comments
 (0)