- Adding
docs/01-app/03-api-reference/05-config/01-next-config-js/cacheMaxMemorySize.mdx
- Various use cache snippet fixes
- Break nuance for fetch default
- Point to correct turbopack cache flags
Adds a **Building** guide (`docs/01-app/02-guides/building.mdx`): what
`next build` does, how to read the route table (`○` Static, `◐` Partial
Prerender, `ƒ` Dynamic), prerendering dynamic routes with
`generateStaticParams`, streaming request-time work, and debugging
prerender errors. Also links the guide from the deploying page and the
`next build` CLI reference.
## What
Adds a `--experimental-cpu-prof` flag to `next dev`, `next build`, and
`next start` commands to capture V8 CPU profiles for debugging
performance bottlenecks.
## Why
When investigating slow builds, slow dev server startups, or production
server performance issues, having access to CPU profiles is invaluable.
This provides a first-party way to capture these profiles without
needing to manually set up the V8 inspector.
## How
- Adds `--experimental-cpu-prof` flag to CLI commands
- Uses V8's built-in CPU profiler via Node.js inspector module
- Profiles are saved to `.next/cpu-profiles/` with descriptive filenames
- Profiles are saved on process exit (Ctrl+C, SIGTERM, or normal exit)
### Profile files generated
**`next dev`:**
- `dev-main-*` - Parent process (dev server orchestration)
- `dev-server-*` - Child server process (request handling and rendering)
**`next build` (Turbopack):**
- `build-main-*` - Main build orchestration process
- `build-turbopack-*` - Turbopack compilation worker
**`next build` (Webpack):**
- `build-main-*` - Main build orchestration process
- `build-webpack-client-*` - Client bundle compilation worker
- `build-webpack-server-*` - Server bundle compilation worker
- `build-webpack-edge-server-*` - Edge runtime compilation worker
**`next start`:**
- `start-main-*` - Production server process
## Changes addressing PR review comments
- Removed signal handlers from `cpu-profile.ts` to prevent conflicts
with CLI cleanup logic (telemetry, traces, etc.)
- Added synchronous exit handler for non-signal process exits (errors,
`process.exit()` calls)
- CLI commands now explicitly call `saveCpuProfile()` as part of their
cleanup before exiting
- Replaced raw ANSI escape codes with `picocolors` library
- Added comprehensive documentation about profile file naming for each
command
- Added build profiling test that verifies correct profile generation
for both Turbopack and Webpack modes
---------
Co-authored-by: Tim Neutkens <tim@timneutkens.nl>
This PR adds instructions on how to run and navigate the new turbopack
bundle analyzer to the existing [Optimizing package bundling guide
](https://nextjs.org/docs/app/guides/package-bundling).
Todo:
- [x] Embed video
- [x] Add image for import chain
---------
Co-authored-by: Luke Sandberg <lukesandberg@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Co-authored-by: Rich Haines <hello@richardhaines.dev>
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Bringing back some info lost when next lint was removed, and accounting
for `isolatedDevBuild` in v16
---------
Co-authored-by: Ismael <ismael@vercel.com>
As part of stabilizing cacheComponents, we are also stabilizing
supporting flags. This flag has been enabled with cacheComponents for
some time and so we are moving it out of experimental.
It will continue to be enabled by default if you are using
cacheComponents. Otherwise, it can be opted into independently via next
config.
Closes https://linear.app/vercel/issue/NDX-1048
Closes https://github.com/vercel/next.js/pull/80317
---------
Co-authored-by: Sebastian "Sebbie" Silbermann <sebastian.silbermann@vercel.com>
Update installation guide, now we have Biome as an option to
create-next-app, and next lint is deprecated.
Also addresses: https://github.com/vercel/next.js/issues/82916
---------
Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Co-authored-by: Ben Gubler <nebrelbug@gmail.com>
As this lands and people learn about the new Route Props helpers, I
think we will have this period where the TypeScript snippets show the
manual typing, but in key places we introduce the helpers usage. We can
then follow up updating all TypeScript snippets showing a page, layout
or route, to use these.
---------
Co-authored-by: Ben Gubler <nebrelbug@gmail.com>
Co-authored-by: JJ Kasper <jj@jjsweb.site>
# Transition from `next lint` to explicit ESLint configs and add Biome support
## What?
This PR makes two major changes to Next.js linting:
1. **Transitions away from `next lint`**: `create-next-app` now generates explicit ESLint configurations instead of relying on the `next lint` command
2. **Adds Biome as a linter option**: Users can now choose between ESLint, Biome, or no linter during project setup
## Why?
**ESLint Transition**: Provides transparency (users see exact rules), better IDE integration, easier customization, and follows industry standards for explicit configuration.
**Biome Support**: Offers a faster, unified linting/formatting tool and gives users more choice in their developer experience.
## How?
### ESLint Configuration Generation
- Generates `eslint.config.mjs` files that extend `eslint-config-next` packages
- Includes proper ignores for build artifacts (`next-env.d.ts`, `.next/`, etc.)
- Package.json scripts call `eslint .` directly instead of `next lint`
- Maintains complete feature parity with current `next lint` behavior
### Biome Integration
- Added `--biome` flag and interactive prompt selection
- Generated `biome.json` configurations with Next.js and React domain rules
- Includes both `lint` and `format` scripts for Biome projects
### Linter Selection
Interactive prompt offers: **ESLint** (comprehensive rules), **Biome** (fast with fewer rules), **None** (skip linter)
### Deprecation
Added deprecation warning to `next lint` command (removed in Next.js 16)
## Testing
Added comprehensive test suites for both ESLint and Biome configuration generation across all template variants.
This change modernizes Next.js linting while providing users with more choice and transparency.
Previously, we asked users if they want to use Turbopack for `next dev`.
Now, we ask if they want to use Turbopack, and if they do, we use it for
both dev and build. It’s also listed as `(recommended)` like App Router.
Test Plan: `pnpm build`, `./node_modules/.bin/create-next-app
~/path/to/app`. Choose the Turbopack option. Verify the app uses
Turbopack for both dev and build.
The `--disable-git` command was implemented in #68821 (released in
`v15.0.0-canary.119`).
It was documented in create-next-app/README.md, but not in the website.
I've seen several discussions online about the feature (usually from
people who remember an old `--no-git` flag) so this will be nice to
publish.
Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>