Skip to content

Use forward slashes in route bundle stats chunk paths - #101617

Merged
sokra merged 1 commit into
canaryfrom
fleet/route-bundle-stats-forward-slashes
Nov 12, 2026
Merged

sokra merged 1 commit into
canaryfrom
fleet/route-bundle-stats-forward-slashes

Conversation

@sokra

@sokra sokra commented Nov 12, 2026

Copy link
Copy Markdown
Member

What?

.next/diagnostics/route-bundle-stats.json now always lists firstLoadChunkPaths with forward slashes, on every platform.

Why?

The paths came from path.relative/path.join, so on Windows they used backslashes (.next\static\chunks\…). This wasn't intentional: it makes the file platform-dependent. Output on Linux and macOS is unchanged.

This is the base of #101540, which computes the same file in Turbopack and should produce identical output on every platform.

How?

toProjectRelativePaths in packages/next/src/build/route-bundle-stats.ts replaces path.sep with /. The production test now asserts /-separated paths and no backslashes.

Verification

  • test/production/route-bundle-stats (Turbopack, start mode) passes with Cache Components on and off.
  • On Linux the stats file is byte-identical to canary's for a mixed App/Pages Router fixture.

Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
@github-actions

github-actions Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Tests Passed

Commit: 0fbadd5
View workflow run

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

Vercel Agent reviewed 0fbadd5 and found no issues.

@sokra
sokra marked this pull request as ready for review November 12, 2026 09:24
@sokra
sokra merged commit bf3d38e into canary Nov 12, 2026
126 checks passed
@sokra
sokra deleted the fleet/route-bundle-stats-forward-slashes branch November 12, 2026 10:10
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.

1 participant