Commit Graph

38 Commits

Author SHA1 Message Date
Joseph b48cb74271 docs: document create-next-app Cache Components prompt and flag (#97798)
Follow up to: Add Cache Components option to create-next-app - #97695
2026-08-31 19:06:39 +02:00
Joseph e551922083 docs: app router reference accuracy (#97477)
- 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
2026-08-18 11:52:26 +02:00
Jarren 1606d9f3f8 docs: rename repo to repository for consistency (#87849)
### What?

changed 'repo' to 'repository'

### Why?

renamed repo to repository for consistency
2026-08-10 14:28:11 -07:00
Joseph da0529d6e8 docs: document ! exclusion and src/ prefix for --debug-build-paths (#96703)
Tying some loose ends in the next cli `### Building specific routes`
section.
2026-08-05 14:42:29 +02:00
Aurora Scharff 2ff53d5e6a docs: add Building guide (#94999)
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.
2026-07-10 19:00:21 +02:00
Sebastian "Sebbie" Silbermann 59c73aecc9 Apply sourcemaps by default during prerender in next build (#93280) 2026-04-28 11:00:13 +02:00
Joseph db0fdc30f6 docs(cli): clarify that --debug-build-paths requires route group folders in paths (#92618)
<!-- CURSOR_AGENT_PR_BODY_BEGIN -->
### What?

Adds a note to the `--debug-build-paths` section of the CLI docs
clarifying that [route
groups](https://nextjs.org/docs/app/building-your-application/routing/route-groups)
must be included in file paths.

### Why?

When using `--debug-build-paths`, users need to include route group
folders (e.g., `(marketing)`) in the file paths they pass. This isn't
obvious from the existing documentation — route groups are stripped from
URLs at runtime but must be present in file paths for this CLI option to
work correctly.

Addresses feedback from a docs comment noting that "Route groups are
also necessary, should be inferred from file paths, but it is not
straightforward from reading this."

### How?

Added a "Good to know" callout with an example showing how to reference
a page inside a route group:

```bash
next build --debug-build-paths="app/(marketing)/about/page.tsx"
```

<!-- NEXT_JS_LLM_PR -->
<!-- CURSOR_AGENT_PR_BODY_END -->

[Slack
Thread](https://vercel.slack.com/archives/C07ND110MMF/p1775828588791049?thread_ts=1775828588.791049&cid=C07ND110MMF)

<div><a
href="https://cursor.com/agents/bc-3a58eac7-35a3-56ab-aff2-f4cf2dd1ca9b"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-3a58eac7-35a3-56ab-aff2-f4cf2dd1ca9b"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</div>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Joseph <icyJoseph@users.noreply.github.com>
2026-04-12 14:13:46 +02:00
Tim Neutkens cf328d3afe CPU prof: Write profiles to .next-profiles instead of .next/cpu-profiles (#92078)
## What?

Writes the CPU profiles to .next-profiles. This makes sure it's not tied
to `.next` / `.next/dev`. It's one consistent place for the file.
2026-04-08 16:08:41 +02:00
Joseph 872c01b5e6 Create next app CLI docs (#90788)
<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?
Updated `installation.mdx` and `create-next-app.mdx` documentation.

### Why?
To accurately reflect the `create-next-app` CLI's behavior regarding
`AGENTS.md` and `CLAUDE.md` file generation, and to update the displayed
default configuration.

### How?
- **`docs/01-app/01-getting-started/01-installation.mdx`**:
- Updated `--yes` flag description to mention `AGENTS.md` and
`CLAUDE.md` inclusion.
- Corrected the recommended defaults prompt to replace "Turbopack" with
"AGENTS.md".
    - Added the `AGENTS.md` prompt to the customize settings section.
- **`docs/01-app/03-api-reference/06-cli/create-next-app.mdx`**:
    - Added `--agents-md` flag to the options table.
    - Updated recommended defaults and customize settings prompts.

Closes NEXT-
Fixes #

-->

---
[Slack
Thread](https://vercel.slack.com/archives/C07BS1WEYAZ/p1772483393984349?thread_ts=1772483393.984349&cid=C07BS1WEYAZ)

<p><a
href="https://cursor.com/agents/bc-2f6bce63-8c1b-544a-9a10-cb65f56b213d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-web-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-web-light.png"><img
alt="Open in Web" width="114" height="28"
src="https://cursor.com/assets/images/open-in-web-dark.png"></picture></a>&nbsp;<a
href="https://cursor.com/background-agent?bcId=bc-2f6bce63-8c1b-544a-9a10-cb65f56b213d"><picture><source
media="(prefers-color-scheme: dark)"
srcset="https://cursor.com/assets/images/open-in-cursor-dark.png"><source
media="(prefers-color-scheme: light)"
srcset="https://cursor.com/assets/images/open-in-cursor-light.png"><img
alt="Open in Cursor" width="131" height="28"
src="https://cursor.com/assets/images/open-in-cursor-dark.png"></picture></a>&nbsp;</p>

---------

Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Joseph <icyJoseph@users.noreply.github.com>
2026-03-03 09:54:10 +01:00
Joseph dcf11d111b docs: clarify that next upgrade is for 16.1.x+ (#90435)
Closes: https://github.com/vercel/next.js/issues/90425
2026-02-24 17:50:03 +01:00
Sebastian "Sebbie" Silbermann 34b5db7e83 Next CLI flags documentation (#89750)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: Joseph Chamochumbi <joseph.chamochumbi@vercel.com>
2026-02-11 20:15:04 +01:00
Jiachi Liu f1a047fd80 IsolatedDevBuild flag removal (#89167)
Co-authored-by: Cursor Agent <cursoragent@cursor.com>
Co-authored-by: jiachi <jiachi@vercel.com>
2026-01-29 15:00:12 +01:00
Jimmy Lai fd5817d004 feat: add --experimental-cpu-prof flag for dev, build, and start (#87946)
## 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>
2026-01-07 11:24:41 +01:00
Delba de Oliveira bfeedb070a Guide: Update Optimizing Package Bundling to include new Bundle Analyzer (#87246)
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>
2025-12-19 16:21:14 +00:00
Joseph f6df65cb11 docs: next experimental-analyze (#87272)
Adding CLI docs for next experimental-analyze

---------

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
2025-12-18 21:41:14 +01:00
Joseph 42690262d6 docs: codemode upgrade command (#87006) 2025-12-10 09:47:04 +01:00
Sebastian "Sebbie" Silbermann 1587978363 [next-upgrade] Add next upgrade (#86120) 2025-11-18 11:53:26 +01:00
Joseph 6ba8ec8725 docs: getting started updates 01 (#85750) 2025-11-05 23:52:23 +01:00
Jiwon Choi afbdae65c0 [CNA] Do not prompt for Turbopack (#85404) 2025-10-28 23:36:57 +01:00
Joseph 3a44c24c98 docs: typegen next-env.d.ts feedback (#85273)
Bringing back some info lost when next lint was removed, and accounting
for `isolatedDevBuild` in v16

---------

Co-authored-by: Ismael <ismael@vercel.com>
2025-10-23 19:50:54 +02:00
Joseph 56136287eb docs: create-next-app react-compiler and new prompts (#85213)
update the create-next-app options and prompts
2025-10-22 11:00:04 +02:00
Delba de Oliveira 02c9a7ede4 Docs: Add --debug-build-paths next build option (#85097)
Related: https://github.com/vercel/next.js/pull/85052
2025-10-20 14:40:00 +01:00
Joseph 332aaf3939 docs: getting started installation and next lint removal (#84781)
- [x] verify rendering of the changes

Also addressing: #84772

---------

Co-authored-by: Jiwon Choi <devjiwonchoi@gmail.com>
2025-10-17 15:39:21 +02:00
Zack Tanner 014228f097 stabilize experimental.enablePrerenderSourcemaps (#84916)
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>
2025-10-16 11:37:01 -07:00
Luke Sandberg ad17ea67c2 docs: update core documentation for Turbopack as default bundler (#84282)
Update next.js docs to account for turbopack being the default bundler.
2025-10-08 14:22:56 -07:00
Luke Sandberg 4adf73c64f Remove references to size metrics in next build from our docs (#83823)
Update docs to account for the removal of JS size metrics.  See #83815 for full context
2025-09-30 09:01:19 -07:00
Joseph a63cd29bae Docs/sep paper cuts (#83689)
Addressing `papercuts` found this month

- Fixes: #83622
2025-09-12 15:12:04 +02:00
Joseph 71d1e9728d docs: next lint post 15.5 release adjustments (#82933)
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>
2025-08-27 00:33:00 +02:00
Ben Gubler 77bb702a01 docs: add explanation of disabling lint for next build (#82805)
Co-authored-by: Zack Tanner <1939140+ztanner@users.noreply.github.com>
2025-08-19 23:27:19 +00:00
Joseph 533bcd1485 docs: Route props helpers, typegen and next lint deprecation (#82784)
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>
2025-08-19 14:32:52 -07:00
Ben Gubler 9c1a97bf56 feat: deprecate 'next lint', add Biome support (#82266)
# 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.
2025-08-19 09:54:20 -07:00
Will Binns-Smith 480a0e1db3 create-next-app: use Turbopack for both dev and build (#82753)
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.
2025-08-18 20:27:30 +00:00
Delba de Oliveira fcfae6eba0 15.4 Docs: Minor feature updates (#81618)
Updates the docs to include the new options in 15.4. 

- `prefetch="auto"` option: https://github.com/vercel/next.js/pull/78689
- `next build` new `--debug-prerender option`:
https://github.com/vercel/next.js/pull/80667

---------

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-07-14 17:33:22 +01:00
Ben Gubler 8b8057d307 docs: add explanation of --disable-git command (#80882)
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>
2025-06-25 18:46:53 +02:00
Delba de Oliveira 2e2ee08b60 Docs IA 2.0: Delete routing section, add BFF guide, polish getting started (#80365)
Closes:
https://linear.app/vercel/issue/DOC-4686/clean-up-routing-section
Redirects: https://github.com/vercel/front/pull/47151

---------

Co-authored-by: Joseph <joseph.chamochumbi@vercel.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
2025-06-16 13:42:20 +01:00
Delba de Oliveira 67921c23ef Docs: Create Examples section (#73858)
Closes: https://linear.app/vercel/issue/DOC-4047/create-examples-section

Redirects: https://github.com/vercel/front/pull/39878
2024-12-13 12:08:44 +00:00
Delba de Oliveira e8af80de75 Docs: Update turbopack API Reference (#73215)
Closes: https://linear.app/vercel/issue/DOC-3886/[page]-turbopack

- Moves `Turbopack` page under API Reference
- Shares page between `app` and `pages` docs
- Updates page to follow template

Redirects: https://github.com/vercel/front/pull/38704
2024-11-26 15:23:28 +00:00
Delba de Oliveira 0b35ddd825 Docs: Move next.config.js API pages under a config folder, fix headings in TS and ESLint config pages (#72465)
This PR:

- Moves `next.config.js` options under a "config" folder which includes
references for other configuration such as the ESLint plugin. I figure
it would be tidier than having "Next.config.js Options" and "Config" in
the API reference.
- Fixes the issue with the "config" folder not showing up in canary:
https://linear.app/vercel/issue/DOC-3749/bug-figure-out-why-new-config-folder-isnt-showing-up-in-the-canary
- Fixes the indentation issues and missing example header (caused by an
invisible character).

Redirects: https://github.com/vercel/front/pull/38704
2024-11-08 14:48:55 +00:00