Skip to content

fix: bundle-size workflow with Next 16#2914

Merged
jorgemoya merged 1 commit intocanaryfrom
fix-bundler-next-16
Mar 9, 2026
Merged

fix: bundle-size workflow with Next 16#2914
jorgemoya merged 1 commit intocanaryfrom
fix-bundler-next-16

Conversation

@jorgemoya
Copy link
Copy Markdown
Contributor

@jorgemoya jorgemoya commented Mar 9, 2026

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

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Mar 9, 2026

⚠️ No Changeset found

Latest commit: 99836fa

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@vercel
Copy link
Copy Markdown

vercel Bot commented Mar 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
catalyst Ready Ready Preview, Comment Mar 9, 2026 7:31pm

Request Review

@jorgemoya jorgemoya force-pushed the fix-bundler-next-16 branch from a6e73ce to 99836fa Compare March 9, 2026 19:30
@jorgemoya jorgemoya changed the title Fix bundler next 16 fix: bundle-size workflow with Next 16 Mar 9, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Mar 9, 2026

Bundle Size Report

Comparing against baseline from 35adccb (2026-03-09).

No bundle size changes detected.

@jorgemoya jorgemoya marked this pull request as ready for review March 9, 2026 19:33
@jorgemoya jorgemoya requested a review from a team March 9, 2026 19:33
@jorgemoya jorgemoya added this pull request to the merge queue Mar 9, 2026
Merged via the queue into canary with commit 0bc63b2 Mar 9, 2026
13 of 14 checks passed
@jorgemoya jorgemoya deleted the fix-bundler-next-16 branch March 9, 2026 22:54
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.

2 participants