-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Docs: Change "target" to "preset" in Nitro example config #5290
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
Conversation
WalkthroughUpdated the React hosting guide to rename Nitro configuration option(s) from Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/start/framework/react/hosting.md(2 hunks)
🧰 Additional context used
📓 Path-based instructions (2)
docs/**/*.{md,mdx}
📄 CodeRabbit inference engine (AGENTS.md)
Use internal docs links relative to the docs/ folder (e.g., ./guide/data-loading)
Files:
docs/start/framework/react/hosting.md
docs/{router,start}/**
📄 CodeRabbit inference engine (AGENTS.md)
Place router docs under docs/router/ and start framework docs under docs/start/
Files:
docs/start/framework/react/hosting.md
🔇 Additional comments (1)
docs/start/framework/react/hosting.md (1)
141-145: Nitro v2 example usespresetcorrectly, no lingeringtarget:in docs/start
Switching fromtargettopresetaligns with v3 terminology and is consistently applied. A scoped search in docs/start found no remainingtarget:references—no further changes needed.
| nitro(/* | ||
| // nitro config goes here, e.g. | ||
| { config: { target: 'node-server' } } | ||
| { config: { preset: 'node-server' } } | ||
| */) | ||
| viteReact(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
Nitro v3 (vite plugin) example updated to preset
Good update. The inline plugin config { config: { preset: 'node-server' } } reads clearly and aligns with the v2 snippet.
If you want external confirmation, check Nitro’s current preset key in v3 docs:
🌐 Web query:
In Nitro v3, is the configuration key `preset` (not `target`) the correct way to select environments like 'node-server' and 'bun' when using the Vite plugin inline config?
💡 Result:
Yes — use the Nitro config key preset (not target). Set it in your nitro config (or via NITRO_PRESET/--preset) to values like "node_server" or "bun". [1][2][3]
Sources:
- Nitro config docs (preset option). [1]
- Nitro Bun runtime (preset: "bun"). [2]
- Nitro deploy/overview (NITRO_PRESET / --preset usage). [3]
Use snake_case preset values in docs
docs/start/framework/react/hosting.md (169–173): change { config: { preset: 'node-server' } } to { config: { preset: 'node_server' } } to align with Nitro v3 config docs (default preset is node_server) (nitropack.org)
🤖 Prompt for AI Agents
In docs/start/framework/react/hosting.md around lines 169 to 173, update the
example Nitro config to use the snake_case preset name expected by Nitro v3;
change the shown preset value from node-server to node_server in the example
object so it matches Nitro v3 docs and the default preset.
"target" has been replaced by "preset"
Summary by CodeRabbit