Skip to content

fix: update isNuxtGenerate flag to use nitro.static #321

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 11, 2025

Conversation

danielroe
Copy link
Collaborator

Description

Since nuxi v3.8, we've supported setting nuxt.options.nitro.static instead of nuxt.options._generate (which is an internal flag) - see nuxt/nuxt#21860.

Now, in preparation for Nuxt v4, we've removed the types for _generate (see nuxt/nuxt#32355). This PR adds support for new version in backwards compatible way (ignoring type issues) - I'd suggest you remove support in a future major.

Linked Issues

Additional Context


Tip

The author of this PR can publish a preview release by commenting /publish below.

@AndreyYolkin AndreyYolkin self-requested a review June 11, 2025 12:24
Copy link
Contributor

@AndreyYolkin AndreyYolkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for pointing that out! Since the module requires Nuxt 3.9 or higher, I think we can drop the _generate flag and move forward with a more modern setup 🚀

@AndreyYolkin AndreyYolkin changed the title fix: prefer nitro.static over _generate fix: update isNuxtGenerate flag to use nitro.static Jun 11, 2025
@AndreyYolkin AndreyYolkin merged commit d713e75 into main Jun 11, 2025
2 checks passed
@userquin userquin deleted the generate-static branch June 11, 2025 13:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants