Skip to content

fix(turbopack): resolve build failure with multiple same-name app icons#89835

Draft
Apro-yuto wants to merge 1 commit intovercel:canaryfrom
Apro-yuto:fix/turbopack-duplicate-icon-metadata-route
Draft

fix(turbopack): resolve build failure with multiple same-name app icons#89835
Apro-yuto wants to merge 1 commit intovercel:canaryfrom
Apro-yuto:fix/turbopack-duplicate-icon-metadata-route

Conversation

@Apro-yuto
Copy link
Copy Markdown

What?

Include file extension in VirtualSource path for static metadata routes to prevent collisions when multiple icon files share the same stem (e.g., icon.png and icon.svg).

Why?

When an app directory contains multiple icon files with the same name but different extensions, Turbopack generates identical VirtualSource paths ({stem}--route-entry.js), causing a build failure.

How?

Changed the VirtualSource path format from {stem}--route-entry.js to {stem}.{ext}--route-entry.js in crates/next-core/src/next_app/metadata/route.rs, making each path unique.

Fixes #85496

  • Tests added
  • e2e test verifies build success, icon link tags in head, and both icon files served correctly

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.

Turbopack build fails if multiple app/ icons have same name

1 participant