Skip to content

fix: support Nitro 2 and 3 server runtimes#844

Draft
onmax wants to merge 1 commit into
nuxt:mainfrom
onmax:agent/support-nitro-2-and-3
Draft

fix: support Nitro 2 and 3 server runtimes#844
onmax wants to merge 1 commit into
nuxt:mainfrom
onmax:agent/support-nitro-2-and-3

Conversation

@onmax

@onmax onmax commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

🔗 Linked issue

N/A

❓ Type of change

  • 📖 Documentation
  • 🐞 Bug fix
  • 👌 Enhancement
  • ✨ New feature
  • 🧹 Chore
  • ⚠️ Breaking change

📚 Description

Warning

Feel free to close this PR if there is another way to make this work. I did it like this so I can also have the pkg.pr.new and be unblocked. Hopefully this is ok :)

Nuxt 5 uses Nitro 3, which splits the server runtime APIs previously exported by nitropack/runtime across nitro/app, nitro/cache, and nitro/runtime-config. Importing either version's entrypoints directly would make the other supported line fail to resolve.

Nuxt 4 keeps using Nitro 2's built-in server auto-imports. On Nuxt 5, the module registers the three required Nitro 3 APIs with addServerImports, resolving them from Nuxt's installed Nitro server package so this also works with strict pnpm dependency isolation.

The existing test job continues to cover Nuxt 4/Nitro 2. A focused Nitro 3 job installs Nuxt 5, builds the existing proxy fixture, and exercises the live runtime config, cache, and proxy paths.

✅ Verification

  • pnpm lint
  • pnpm typecheck
  • pnpm build
  • pnpm exec vitest run --project unit --reporter=dot (779 passed, 2 todo)
  • Nuxt 4/Nitro 2 proxy E2E (3 passed)
  • Focused Nuxt 5/Nitro 3 proxy E2E (2 passed)

@vercel

vercel Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

@onmax is attempting to deploy a commit to the Nuxt Team on Vercel.

A member of the Team first needs to authorize it.

@pkg-pr-new

pkg-pr-new Bot commented Jul 24, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@nuxt/scripts@844

commit: 346d651

@onmax
onmax force-pushed the agent/support-nitro-2-and-3 branch from 3220f26 to 2b82982 Compare July 24, 2026 08:26
@onmax
onmax force-pushed the agent/support-nitro-2-and-3 branch from 2b82982 to 346d651 Compare July 24, 2026 09:06
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.

1 participant