Skip to content

feat(nuxt): warn when public files override application routes - #35674

Merged
danielroe merged 3 commits into
nuxt:mainfrom
Norbiros:feat/warn-on-public-index-html
Jul 19, 2026
Merged

danielroe merged 3 commits into
nuxt:mainfrom
Norbiros:feat/warn-on-public-index-html

Conversation

@Norbiros

Copy link
Copy Markdown
Collaborator

🔗 Linked issue

Resolves #31103

📚 Description

Adds a warning for conflicting public/ assets and application routes.

@Norbiros
Norbiros requested a review from danielroe as a code owner July 19, 2026 08:18
@github-actions github-actions Bot added 5.x ✨ enhancement New feature or improvement to existing functionality labels Jul 19, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35674

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35674

nuxt

npm i https://pkg.pr.new/nuxt@35674

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35674

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35674

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35674

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35674

commit: 934457a

@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/nuxt/src/pages/module.ts`:
- Line 475: Wrap the statSync call in the file-checking loop with try...catch,
treating expected filesystem conflicts such as ENOTDIR (and missing paths) as
non-matches so the build continues. Preserve the existing isFile check and
continue behavior for valid paths.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 5f1a4222-4c38-4ed8-9a64-4a239acfa129

📥 Commits

Reviewing files that changed from the base of the PR and between 24eec37 and 2742ece.

📒 Files selected for processing (4)
  • packages/kit/src/diagnostics/pages.ts
  • packages/nuxt/src/pages/module.ts
  • packages/nuxt/src/pages/public-assets.ts
  • packages/nuxt/test/public-assets.test.ts

Comment thread packages/nuxt/src/pages/module.ts Resolved
@codspeed

codspeed Bot commented Jul 19, 2026 •

Copy link
Copy Markdown

Merging this PR will improve performance by 11.65%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
✅ 20 untouched benchmarks
⏩ 3 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
⚡ initial production build in the minimal test fixture 2 s 1.8 s +11.65%

Tip

Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Norbiros:feat/warn-on-public-index-html (934457a) with main (65e8551)

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. ↩

@Norbiros
Norbiros force-pushed the feat/warn-on-public-index-html branch from 2742ece to 7c6b6b2 Compare July 19, 2026 09:55
@danielroe
danielroe enabled auto-merge July 19, 2026 10:21
@danielroe
danielroe added this pull request to the merge queue Jul 19, 2026
Merged via the queue into nuxt:main with commit 827e563 Jul 19, 2026
28 checks passed
@github-actions github-actions Bot mentioned this pull request Jul 19, 2026
2 of 5 tasks
danielroe added a commit that referenced this pull request Aug 12, 2026
This was referenced Aug 12, 2026
@github-actions github-actions Bot mentioned this pull request Aug 28, 2026
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x ✨ enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

index.html in public

2 participants