Skip to content

Conversation

@ablaszkiewicz
Copy link
Contributor

@ablaszkiewicz ablaszkiewicz commented Oct 6, 2025

🔗 Linked issue

#33406

📚 Description

Registering nitro plugin within custom nuxt module does not work out of the box. You actually have to explicitly import stuff like defineNitroPlugin or useRuntimeConfig for it to work. Added that section to the docs.

@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@ablaszkiewicz ablaszkiewicz changed the title docs: add custom module addServerPlugin warning docs: add custom nuxt module addServerPlugin warning Oct 6, 2025
@coderabbitai
Copy link

coderabbitai bot commented Oct 6, 2025

Walkthrough

A documentation file (docs/3.api/5.kit/11.nitro.md) was updated. A warning block was added under the addServerPlugin section stating that defineNitroPlugin must be explicitly imported from nitropack/runtime, with a similar note for utilities like useRuntimeConfig. No source code or public API changes are included; this is a content-only docs update.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Title Check ✅ Passed The title clearly states that documentation is being updated to add a warning for the custom Nuxt module addServerPlugin feature, accurately reflecting the main change in the pull request.
Description Check ✅ Passed The description outlines the linked issue and explains that the PR adds a documentation section about explicitly importing defineNitroPlugin and useRuntimeConfig for custom Nuxt modules, which aligns directly with the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests (beta)
  • 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.

Copy link

@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: 0

🧹 Nitpick comments (1)
docs/3.api/5.kit/11.nitro.md (1)

200-202: Align the example with the new warning

The new warning tells readers they must explicitly import defineNitroPlugin (and similar utilities), yet the example immediately below still omits that import. This contradiction will confuse module authors. Please update the snippet—at least add import { defineNitroPlugin } from 'nitropack/runtime' at the top of runtime/plugin.ts, and likewise show imports for any other utilities you mention.

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between d32859d and bce7158.

📒 Files selected for processing (1)
  • docs/3.api/5.kit/11.nitro.md (1 hunks)

@danielroe danielroe merged commit 04d4c05 into nuxt:main Oct 6, 2025
10 of 11 checks passed
This was referenced Oct 6, 2025
@github-actions github-actions bot mentioned this pull request Oct 23, 2025
@github-actions github-actions bot mentioned this pull request Oct 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants