Skip to content

fix: try to resolve server entry also from server dir - #4313

Merged
pi0 merged 2 commits into
mainfrom
fix/server-entry
Jun 4, 2026
Merged

fix: try to resolve server entry also from server dir#4313
pi0 merged 2 commits into
mainfrom
fix/server-entry

Conversation

@pi0x

@pi0x pi0x commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@pi0x
pi0x requested a review from pi0 as a code owner June 4, 2026 18:09
@vercel

vercel Bot commented Jun 4, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
nitro.build Ready Ready Preview, Comment Jun 4, 2026 6:45pm

Request Review

@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 66d242ce-c58f-4284-bb5f-d2f8383f6a1a

📥 Commits

Reviewing files that changed from the base of the PR and between a250793 and e92698f.

📒 Files selected for processing (1)
  • src/config/resolvers/paths.ts

📝 Walkthrough

Walkthrough

This PR updates server entry auto-detection in Nitro's path resolver: when options.serverDir is set and differs from options.rootDir, resolveModulePath('./server') searches from [options.serverDir, options.rootDir]; otherwise it searches only from options.rootDir.

Changes

Server Entry Detection

Layer / File(s) Summary
Server entry detection search roots
src/config/resolvers/paths.ts
Module resolution search roots for server entry auto-detection now extend to include options.serverDir alongside options.rootDir when the server directory is configured and differs from root.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive No pull request description was provided by the author, making it impossible to assess relevance to the changeset. Add a description explaining the purpose and impact of the server entry resolution changes.
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title follows conventional commits format with 'fix:' prefix and clearly describes the main change: adjusting module resolution to search from server directory.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/server-entry

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 and usage tips.

@pkg-pr-new

pkg-pr-new Bot commented Jun 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/nitro@4313

commit: a250793

Comment thread src/config/resolvers/paths.ts Outdated
Co-authored-by: Pooya Parsa <pyapar@gmail.com>
@pi0
pi0 merged commit 0a07991 into main Jun 4, 2026
8 of 10 checks passed
@pi0
pi0 deleted the fix/server-entry branch June 4, 2026 18:44
raminjafary added a commit to raminjafary/nuxt that referenced this pull request Jul 2, 2026
Bump nitro to 3.0.260610-beta so the server entry is auto-detected from
the server/ directory in addition to the project root (nitrojs/nitro#4313),
matching upstream Nitro behaviour and keeping the root directory tidy.

Closes nuxt#35484
raminjafary added a commit to raminjafary/nuxt that referenced this pull request Jul 2, 2026
Bump nitro to 3.0.260610-beta so the server entry is auto-detected from
the server/ directory in addition to the project root (nitrojs/nitro#4313),
matching upstream Nitro behaviour and keeping the root directory tidy.

Closes nuxt#35484
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.

2 participants