Remove webpack stats generation from Turbopack#91515
Merged
wbinnssmith merged 1 commit intocanaryfrom Mar 17, 2026
Merged
Conversation
The TURBOPACK_STATS feature generated webpack-compatible stats.json files from Turbopack's output, but it is no longer needed. Remove the entire feature: the Rust implementation (webpack_stats.rs), all call sites in app.rs and pages.rs, the project flag, and all TypeScript manifest loading, merging, and writing code. Co-Authored-By: Claude <noreply@anthropic.com>
Collaborator
Tests Passed |
Collaborator
Stats from current PR✅ No significant changes detected📊 All Metrics📖 Metrics GlossaryDev Server Metrics:
Build Metrics:
Change Thresholds:
⚡ Dev Server
📦 Dev Server (Webpack) (Legacy)📦 Dev Server (Webpack)
⚡ Production Builds
📦 Production Builds (Webpack) (Legacy)📦 Production Builds (Webpack)
📦 Bundle SizesBundle Sizes⚡ TurbopackClient Main Bundles
Server Middleware
Build DetailsBuild Manifests
📦 WebpackClient Main Bundles
Polyfills
Pages
Server Edge SSR
Middleware
Build DetailsBuild Manifests
Build Cache
🔄 Shared (bundler-independent)Runtimes
📎 Tarball URL |
Merging this PR will degrade performance by 3.99%
Performance Changes
Comparing Footnotes
|
wbinnssmith
approved these changes
Mar 17, 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?
Remove the
TURBOPACK_STATSfeature that generated webpack-compatiblewebpack-stats.jsonfiles from Turbopack's output.Deleted:
crates/next-api/src/webpack_stats.rs— the entire 305-line Rust implementation that built webpack-format stats (assets, chunks, modules, entrypoints) from Turbopack's module graphRust changes:
crates/next-api/src/lib.rs— removedmod webpack_stats;crates/next-api/src/project.rs— removedshould_create_webpack_stats()which read theTURBOPACK_STATSenv varcrates/next-api/src/pages.rs— removedgenerate_webpack_statsimport and stats output emissioncrates/next-api/src/app.rs— sameTypeScript changes:
packages/next/src/shared/lib/constants.ts— removedWEBPACK_STATS = 'webpack-stats.json'constantpackages/next/src/shared/lib/turbopack/manifest-loader.ts— removedloadWebpackStats(),writeWebpackStats(),mergeWebpackStats(), thewebpackStatsfield, webpack type imports, and theTURBOPACK_STATSenv guard inwriteManifests()packages/next/src/server/dev/turbopack-utils.ts— removedshouldCreateWebpackStatsflag and twoloadWebpackStats()call sitespackages/next/src/build/handle-entrypoints.ts— sameWhy?
This feature is no longer needed and adds dead complexity. It was opt-in via
TURBOPACK_STATS=1but nothing in the current codebase or tooling depends on it.How?
Pure deletion — no behavior change for any existing user, as the feature was opt-in via an environment variable that is no longer checked.
Intentionally left untouched:
stats.jsongeneration (non-Turbopack path)analyzefeatureroute-bundle-stats.jsonin.next/diagnostics/