Skip to content

Commit 272e43a

Browse files
authored
fix: prefer nitro.static over _generate (#406)
1 parent 7020292 commit 272e43a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/module.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ export default defineNuxtModule<ModuleOptions>({
5757

5858
// Use `server` provider when SSR is disabled or generate mode
5959
if (!options.provider) {
60-
options.provider = (!nuxt.options.ssr || nuxt.options._generate)
60+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
61+
options.provider = (!nuxt.options.ssr || nuxt.options.nitro.static || (nuxt.options as any)._generate)
6162
? 'iconify'
6263
: 'server'
6364
}

0 commit comments

Comments
 (0)