fix: bundle-size workflow with Next 16#2914
Merged
Conversation
|
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
a6e73ce to
99836fa
Compare
Contributor
Bundle Size ReportComparing against baseline from No bundle size changes detected. |
matthewvolk
approved these changes
Mar 9, 2026
chanceaclark
pushed a commit
that referenced
this pull request
Apr 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What/Why?
Next.js 16 uses Turbopack by default for next build. Turbopack does not produce app-build-manifest.json (a webpack-only artifact). The existing bundle-size.mts script reads that file and exits with an error when it's missing.
With Turbopack, per-route client chunk info is split across per-page server/app/**/*_client-reference-manifest.js files. Crucially, no layout manifests exist in Turbopack output — each page manifest already includes chunks from all ancestor layouts. build-manifest.json (with rootMainFiles and polyfillFiles) still exists in both builds.
Root Cause
.next/app-build-manifest.json does not exist after next build with Turbopack (Next.js 16 default). The CI workflow runs pnpm build (which uses Turbopack) then immediately calls
node bundle-size.mts generate, which fails at the existence check.
Testing
Added test and check below
Migration
N/A