Skip to content

Commit 742b663

Browse files
authored
fix: prefer nitro.static over _generate (#601)
1 parent 94aee1c commit 742b663

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/module.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineNuxtModule<ModuleOptions>({
2626
defaults: {},
2727
async setup(options: ModuleOptions, nuxt: Nuxt) {
2828
// Cannot be used with `nuxt generate`
29-
if (nuxt.options._generate) {
29+
if (nuxt.options.nitro.static || (nuxt.options as any)._generate /* TODO: remove in future */) {
3030
log.error('NuxtHub is not compatible with `nuxt generate` as it needs a server to run.')
3131
log.info('To pre-render all pages: `https://hub.nuxt.com/docs/recipes/pre-rendering#pre-render-all-pages`')
3232
return process.exit(1)

0 commit comments

Comments
 (0)