mirror of
https://github.com/vercel/next.js.git
synced 2026-09-20 02:25:18 +08:00
5809756f55
This: - Fetches `data/_app/analyze.data` alongside the current route's data - Merges `_app` modules into the current route's `AnalyzeData` before visualization using a `mergeAnalyzeData()`, which merges the two datasets, reindexing the additional ones and recreating the binary data format expected by the treemap. ## Test plan - [x] Add a large dependency (e.g. `moment`) in `pages/_app.tsx` - [x] Run `next experimental-analyze` - [x] Open the bundle analyzer and select a pages page - [x] Verify moment appears in the treemap - [x] Verify App Router projects (no `_app`) work without errors
Bundle Analyzer
A Next.js application for visualizing bundle sizes and analyzing dependencies using interactive treemaps.
This package is not published to npm. Instead it's built and vendored into the main next package during its build process.
Features
- 📊 Interactive Treemap: Visualize bundle sizes with an interactive treemap interface
- 🎯 Route-based Analysis: Analyze bundle data for specific routes in your application
- 🔍 Dependency Tracking: View import chains and dependency relationships
- 🎨 Filter Controls: Filter by environment (client/server) and file types (JS/CSS/JSON/Assets)
- 🔎 Search Functionality: Search through files in your bundle
Updating
When landing non-trivial changes, consider updating the demo site: