Skip to content

build: resolve subpath types under nodenext - #4757

Merged
pi0 merged 2 commits into
v2from
fix/nodenext
Oct 13, 2026
Merged

pi0 merged 2 commits into
v2from
fix/nodenext

Conversation

@danielroe

@danielroe danielroe commented Oct 9, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked issue

resolves nuxt/nuxt#36516
resolves nuxt/nuxt#36481
resolves nuxt/nuxt#36526

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 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)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

in nuxt v5, we will be switching the module resolution mode for nuxt.config to nodenext, and in fact this is already enabled when compatibilityVersion: 5.

under nodenext, nitropack/types, nitropack/runtime and nitropack/presets do not type correctly, because the root shims contain export * from "./dist/types/index"; (that is, they do not have a file extension - and therefore TS won't resolve it under nodenext)

this PR rewrites the shims with a .js extension, which works fine under node10, nodenext and bundler alike (fwiw, we have been patching nitro in the nuxt/nuxt repo since nuxt/nuxt#35943 - I should have raised this sooner!).

📝 Checklist

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

@danielroe danielroe self-assigned this Oct 9, 2026
@danielroe
danielroe requested a review from pi0 as a code owner October 9, 2026 13:58
@danielroe danielroe added the v2 label Oct 9, 2026
@vercel

vercel Bot commented Oct 9, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
nitro.build Ready Ready Preview Oct 9, 2026 1:58pm UTC

Request Review

@coderabbitai

coderabbitai Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 351974b5-2700-4c2c-a32b-ade0aeeb73ef

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • 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 9, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitropack@4757

commit: 3375215

@pi0
pi0 merged commit 48c9a85 into v2 Oct 13, 2026
12 checks passed
@pi0
pi0 deleted the fix/nodenext branch October 13, 2026 14:30

This branch was successfully deployed

1 active deployment
Preview — 33752153 Deployed Oct 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants