next.js
bf3d38e4 - Use forward slashes in route bundle stats chunk paths (#101617)

Commit
21 days ago
Use forward slashes in route bundle stats chunk paths (#101617) ## 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. <!-- NEXT_JS_LLM --> <!-- fleet 8793ade5-4b7e-45ac-9d71-dd78d2669301 --> Co-authored-by: vercel-fleet-prod[bot] <318278635+vercel-fleet-prod[bot]@users.noreply.github.com> Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com>
Author
Parents
Loading