fix: support Nitro 2 and 3 server runtimes#844
Draft
onmax wants to merge 1 commit into
Draft
Conversation
Contributor
|
@onmax is attempting to deploy a commit to the Nuxt Team on Vercel. A member of the Team first needs to authorize it. |
commit: |
onmax
force-pushed
the
agent/support-nitro-2-and-3
branch
from
July 24, 2026 08:26
3220f26 to
2b82982
Compare
onmax
force-pushed
the
agent/support-nitro-2-and-3
branch
from
July 24, 2026 09:06
2b82982 to
346d651
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Linked issue
N/A
❓ Type of 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/runtimeacrossnitro/app,nitro/cache, andnitro/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 lintpnpm typecheckpnpm buildpnpm exec vitest run --project unit --reporter=dot(779 passed, 2 todo)