Skip to content

Conversation

@oliwheeler
Copy link
Contributor

@oliwheeler oliwheeler commented Sep 29, 2025

"target" has been replaced by "preset"

Summary by CodeRabbit

  • Documentation
    • Updated the React hosting guide to correct the node-server configuration syntax in example snippets for Nitro v2 and Nitro v3, replacing the outdated key with the current one.
    • Clarifies recommended configuration for deploying with node-server across both Nitro versions.
    • Docs-only change; no runtime or behavioral impact.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Sep 29, 2025

Walkthrough

Updated the React hosting guide to rename Nitro configuration option(s) from target: 'node-server' to preset: 'node-server' in both Nitro v2 and Nitro v3 example snippets; no other content or behavior was changed.

Changes

Cohort / File(s) Summary
Docs — React hosting guide
docs/start/framework/react/hosting.md
Replaced target: 'node-server' with preset: 'node-server' in two example locations (nitroV2Plugin usage and Nitro config) for Nitro v2 and Nitro v3; no other edits.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

A rabbit hops through docs at night,
Swapping target for preset just right.
Tiny change, tidy and bright,
Configs aligned, burrow light. 🥕✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title concisely and accurately summarizes the core change of replacing the “target” option with “preset” in the Nitro example configuration, clearly signaling that this is a documentation update.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added the documentation Everything documentation related label Sep 29, 2025
@oliwheeler oliwheeler changed the title Docs: Change "target" to "preset" in Nitro v3 example config Docs: Change "target" to "preset" in Nitro example config Sep 29, 2025
Copy link
Contributor

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between 81888c8 and 8b1bd6c.

📒 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 uses preset correctly, no lingering target: in docs/start
Switching from target to preset aligns with v3 terminology and is consistently applied. A scoped search in docs/start found no remaining target: references—no further changes needed.

Comment on lines 169 to 173
nitro(/*
// nitro config goes here, e.g.
{ config: { target: 'node-server' } }
{ config: { preset: 'node-server' } }
*/)
viteReact(),
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 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.

@schiller-manuel schiller-manuel merged commit 31e5b9c into TanStack:main Sep 29, 2025
2 checks passed
@oliwheeler oliwheeler deleted the docs-nitro-preset branch September 30, 2025 07:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Everything documentation related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants