fix(kit,nitro): ignore baseUrl with compatibilityVersion 5 by oritwoen · Pull Request #36040 · nuxt/nuxt · GitHub
Skip to content

fix(kit,nitro): ignore baseUrl with compatibilityVersion 5 - #36040

Merged
danielroe merged 1 commit into
nuxt:mainfrom
oritwoen:fix/gate-base-url-compatibility
Aug 13, 2026
Merged

danielroe merged 1 commit into
nuxt:mainfrom
oritwoen:fix/gate-base-url-compatibility

Conversation

@oritwoen

Copy link
Copy Markdown
Contributor

🔗 Linked issue

N/A

📚 Description

This splits the backportable change from #36036.

With compatibilityVersion: 5, generated Kit and Nitro TypeScript configurations ignore deprecated compilerOptions.baseUrl. Earlier compatibility versions keep their current behavior, and the migration guide covers moving relative aliases to absolute paths.

@oritwoen
oritwoen requested a review from danielroe as a code owner August 11, 2026 13:04
@github-actions github-actions Bot added 5.x 🐛 bug Something isn't working as expected labels Aug 11, 2026
@pkg-pr-new

pkg-pr-new Bot commented Aug 11, 2026

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 87eaccf9-7bff-44a9-b640-efe111297ee7

📥 Commits

Reviewing files that changed from the base of the PR and between d214194 and 957c0df.

📒 Files selected for processing (5)
  • docs/1.getting-started/18.upgrade.md
  • packages/kit/src/template.ts
  • packages/kit/test/generate-types.spec.ts
  • packages/nitro-server/src/index.ts
  • packages/nuxt/test/load-nuxt.test.ts

Walkthrough

Nuxt 5 no longer uses compilerOptions.baseUrl in generated TypeScript configurations. Alias resolution uses the build directory. Nuxt 4 retains the configured baseUrl behaviour. Nuxt Kit and Nitro apply the compatibility-specific logic. Tests cover generated TypeScript configurations and Nitro aliases for both compatibility versions. Upgrade documentation describes the change and shows absolute alias configuration using fileURLToPath and import.meta.url.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the main change: ignoring baseUrl for compatibilityVersion 5 in Kit and Nitro.
Description check ✅ Passed The description directly explains the compatibilityVersion 5 changes, preserved earlier behaviour, and migration guidance.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

@codspeed

codspeed Bot commented Aug 11, 2026

Copy link
Copy Markdown

Merging this PR will not alter performance

✅ 21 untouched benchmarks
⏩ 3 skipped benchmarks1


Comparing oritwoen:fix/gate-base-url-compatibility (957c0df) with main (d214194)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@danielroe danielroe 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.

thank you! ❤️

@danielroe
danielroe added this pull request to the merge queue Aug 13, 2026
Merged via the queue into nuxt:main with commit 2409d92 Aug 13, 2026
59 of 61 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x 🐛 bug Something isn't working as expected

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants