Skip to content

fix: import nitro helpers from nitropack/runtime - #3889

Merged
farnabaz merged 1 commit into
mainfrom
fix/nitro-runtime-imports
Oct 20, 2026
Merged

farnabaz merged 1 commit into
mainfrom
fix/nitro-runtime-imports

Conversation

@benjamincanac

@benjamincanac benjamincanac commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

#3770

❓ 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 like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Since Nuxt 4.6.2, apps with compatibilityVersion: 5 fail to build as soon as they use Content:

"useRuntimeConfig" is not exported by "virtual:#imports", imported by "@nuxt/content/dist/runtime/api/query.post.js"

nuxt/nuxt#36548 now really drops the nitro presets from #imports when experimental.nitroAutoImports is off, which is the default with compat v5. This PR imports useRuntimeConfig, useAppConfig and defineNitroPlugin from nitropack/runtime instead, like the database handlers already do. queryCollection stays on #imports since the module registers it with addServerImports.

I checked it on the Nuxt UI playground and docs with Nuxt 4.6.2. Nuxt 5 support will follow in a separate PR.

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@vercel

vercel Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
content Ready Ready Preview Oct 20, 2026 9:24am UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 92bd5136-2fdf-48f6-9f63-f873d5b7f58e
📥 Commits

Reviewing files that changed from the base of the PR and between 978fbc5 and e2f2d97.

📒 Files selected for processing: 4
  • src/features/llms/runtime/server/content-llms.plugin.ts
  • src/features/llms/runtime/server/routes/raw/[...slug].md.get.ts
  • src/runtime/api/preview.ts
  • src/runtime/api/query.post.ts

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 7 remain after this review.

📝 Walkthrough

Four server-side files now import Nitro runtime helpers from nitropack/runtime instead of #imports. The plugin continues to import queryCollection from #imports, with its TypeScript suppression comment retained. The summaries report no changes to route behavior, API handling, validation, or returned data.

Priority: ➖ Normal

Estimated code review effort: 1 (Trivial) | ~4 minutes

Merge Risk: ⚪ Minimal · up to e2f2d

The import updates are mergeable with no identified blocking risk.

Pre-merge checks: Passed 5
Check name Status Explanation
Title check Passed The title clearly and concisely describes the main change: importing Nitro helpers from nitropack/runtime.
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Description check Passed The pull request description directly explains the Nitro import changes and the compatibility v5 build failure addressed by the changeset.
Full details: Docstring Coverage

Explanation

No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 4 files.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

@pkg-pr-new

pkg-pr-new Bot commented Oct 20, 2026

Copy link
Copy Markdown
npm i https://pkg.pr.new/@nuxt/content@3889

commit: e2f2d97

@farnabaz farnabaz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks

@farnabaz
farnabaz merged commit b7b9c13 into main Oct 20, 2026
9 checks passed
@farnabaz
farnabaz deleted the fix/nitro-runtime-imports branch October 20, 2026 15:04

This branch was successfully deployed

1 active deployment
Preview — e2f2d971 Deployed Oct 20, 2026 by vercel[bot]
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.

4 participants