Skip to content
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

fix: support nitro preset detection in zero config environments #216

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

HADB
Copy link
Contributor

@HADB HADB commented Jul 24, 2024

πŸ”— Linked issue

resolves #213

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

After some digging, I found out that nuxt.options.nitro.preset was undefined in my cloudflare build environment with zero-config support of nitro, but there's an environment variable NITRO_PRESET:"cloudflare_pages" we can use to detect the nitro preset just as nitro doing itself: unjs/nitro: src/core/config/loader.ts

@antfu
Copy link
Member

antfu commented Jul 24, 2024

Thanks you!

@antfu antfu merged commit 7587b2a into nuxt:main Jul 24, 2024
1 check passed
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.

"serverBundle: auto" seems not work on cloudflare
2 participants