- 23 Sep, 2025 36 commits
-
-
nextjs-bot authored
-
Jiwon Choi authored
A single test file is starting 3 next instances sequentially. This can be paralleled from different test files. This PR splits tests per "describe" and does not change its content.
-
Sebastian "Sebbie" Silbermann authored
-
Tobias Koppers authored
### What? add more details to the panic message
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Add a JS module type that does no analysis, and just concatenates the source file into the output file. As a consequence however, the input module cannot have - `import`s/`require`s/`new Worker`/... - ~~`process.env.*` that should be replaced~~ - JSX/any new syntax, since the module won't be transpiled using the user's browserslist ``` before: ✓ Starting... ✓ Ready in 335ms ○ Compiling / ... ✓ Compiled / in 980ms GET / 200 in 1258ms after: ✓ Starting... ✓ Ready in 406ms ✓ Compiled / in 406ms GET / 200 in 692ms ``` <img width="1358" height="959" alt="Bildschirmfoto 2025-09-16 um 12 09 47" src="https://github.com/user-attachments/assets/87bb3161-8749-475b-9a84-bf62324735e4" /> <img width="1352" height="939" alt="Bildschirmfoto 2025-09-16 um 12 12 48" src="https://github.com/user-attachments/assets/4a42e724-7090-4ca7-bad9-41e5cf1af80b" />
-
Benjamin Woodruff authored
This config name was previously deprecated in a 15.x release (renamed to `turbopack`), and there's already a codemod to migrate these over.
-
Niklas Mischkulnig authored
- slightly fewer clones - slightly fewer turbotask calls
-
Luke Sandberg authored
The `affecting_sources` field on `ResolveResult` and `ModuleResolveResult` are used for file tracing, but not for normal builds. So make tracking this information conditional. This will be a minor performance win for a few reasons * no allocations to store these lists * no storing this data in the PC database * changes to affecting sources won't invalidate resolution results. Closes PACK-5438
-
nextjs-bot authored
-
Niklas Mischkulnig authored
Errors returned from the callback are never read. Instead, send errors returned from the `future` over the channel.
-
Niklas Mischkulnig authored
-
Niklas Mischkulnig authored
It compiles fine, but we have another problem: `cargo fmt` really doesn't like it ``` cargo fmt -- turbopack/crates/turbo-tasks-fs/src/lib.rs error: let chains are only allowed in Rust 2024 or later --> /Users/niklas/code/next.js/turbopack/crates/turbo-tasks-fs/src/lib.rs:749:44 | 749 | if create_directory && let Some(parent) = full_path.parent() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: let chains are only allowed in Rust 2024 or later --> /Users/niklas/code/next.js/turbopack/crates/turbo-tasks-fs/src/lib.rs:893:44 | 893 | if create_directory && let Some(parent) = full_path.parent() { | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: let chains are only allowed in Rust 2024 or later --> /Users/niklas/code/next.js/turbopack/crates/turbo-tasks-fs/src/lib.rs:1233:12 | 1233 | if let Some(path) = join_path(&self.path, path) | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``` The precommit hook that selectively runs on files is simply not a supported usecase. So I changed that to `rustfmt --edition 2024 -- ` now🤷 Previous discussion: https://vercel.slack.com/archives/C03EWR7LGEN/p1748898285716779 -
Jude Gao authored
This PR integrates an MCP server into the Next.js development server at `/_next/mcp`, enabling AI agents to programmatically interact with Next.js projects. We're including an initial `get_project_path.` tool as an example that returns the project's absolute path - this serves as a starting point to demonstrate how tools can expose project information to MCP clients, with plans to expand the available tools for richer AI-assisted development experiences.
-
Steven authored
We have found many Next.js users are confused why images keep revalidating so frequently (increasing cpu and cost). The reason is usually that their upstream source images are missing the `cache-control` header and thus fallback to the 60 second revalidation default. This its not a great default since most images don't change frequently. This PR is a breaking change to bump the `images.minimumCacheTTL` config from 60 (1 min) to 14400 (4 hours). Why 4 hours? Because its long enough to take advantage of the durable cache, but short enough that changing or deleting the upstream src image will take effect on the same day. For advanced use cases where images are changing frequently, developers can change this behavior back by reducing `images.minimumCacheTTL` to a lower value.
-
Joseph authored
Noted through a feedback channel.
-
Tobias Koppers authored
### What? give more information when a graph panic happens
-
Tobias Koppers authored
### What? Improve persistent caching test cases to cover: * next config changes * env var changes * standalone changes and combined changes Also improve the performance of the test case and makes it easier to extend.
-
Joseph authored
Aligning with the actual type https://github.com/vercel/next.js/blob/canary/packages/next/src/server/instrumentation/types.ts#L18
-
nextjs-bot authored
-
Tim Neutkens authored
## What? Only `require()` the file as needed when the experimental flag is on.
-
Tim Neutkens authored
## What? Don't load the webpack build-manifest-plugin because it imports some webpack pieces.
-
Tim Neutkens authored
## What? Avoid requiring webpack when using Turbopack. This makes "ready in" roughly 50ms faster.
-
nextjs-bot authored
-
liketiger authored
## Documentation Update This PR improves the dynamic routes example in the `project-structure.mdx` page. ### Changes - Updated catch-all segments example: - Before: `/shop/clothing/shoes` - After: `/shop/clothing` - Adjusted follow-up examples for consistency: - `/shop/a`, `/shop/a/b` → `/shop/clothing`, `/shop/clothing/shirts` ### Why - Provides a clearer and more intuitive demonstration of how catch-all segments work. - Keeps the example consistent with other dynamic routes documentation. Co-authored-by:Joseph <joseph.chamochumbi@vercel.com>
-
Hendrik Liebau authored
In error messages and in docs for `'use cache'` and related APIs, we now guide users to the `experimental.cacheComponents` config instead of `experimental.useCache`. closes NAR-410
-
Lachlan Campbell authored
### What? Both links in this file were broken/out of date. ### Why? ### How? Updated with new links, open to suggestions if we want to link elsewhere! Co-authored-by:Joseph <joseph.chamochumbi@vercel.com>
-
Tim Neutkens authored
## What? Changes the way TypeScript config validation behaves. It no longer does `require('typescript')` and instead reads the `tsconfig.json`. This introduces one new limitation which is that `extends` and `references` cause the automatic config rewriting to be skipped, i.e. it does not verify your `extends` / `references`. In my opinion that tradeoff is fine though because if you're using these you likely already don't want Next.js to actively write into the project config file. At least that has been a common feedback from the community. In cpu profiles this change shows 115ms -> 4ms. Why does it take 115ms? TypeScript itself is quite large, lot of code to parse. However, we're only reading a few values from it like the version, some config options, and the config reading logic itself. In the CPU profile it really is showing 4ms spent in Next.js and the rest is the process of requiring TypeScript. -
Tobias Koppers authored
### What? `referenced_output_assets` are different for every chunk group. Attaching them as references to a random chunk in the group causes a different Chunk instance which not only causes duplicate work, but also multiple writes to the same file. This fixes that by refactoring that and attaching the `referenced_output_assets` higher. Actually it simplifies it. Closes PACK-4322 Closes PACK-4392
-
Tim Neutkens authored
## What? Follow-up to #83949 While testing the changes I ran Turbopack builds and all time was captured, but for webpack there was some missing time related to tracing outputs (Turbopack does the tracing internally). This PR adds the missing spans to trace-build.
-
Luke Sandberg authored
Standardize the spelling of 'analyze' Clearly I'm bringing my American perspective here, but the thing that really irked me was the inconsistency.
-
Tobias Koppers authored
### What? include availability hash in the ident of evaluated chunks groups just like with normal chunk groups
-
Tobias Koppers authored
### What? As preparation to add chunk group referenced assets.
-
Jude Gao authored
Port the implementation from pages router to app router. https://github.com/vercel/next.js/blob/27515900b31bfad83c3ecc65ed2e5d020ec289a6/packages/next/src/client/dev/hot-reloader/pages/websocket.ts --------- Co-authored-by:
devjiwonchoi <devjiwonchoi@gmail.com> Co-authored-by:
JJ Kasper <jj@jjsweb.site>
-
Benjamin Woodruff authored
This option was renamed/stabilized from `experimental.turbo` to `turbopack` in 15.3. The app router page title/path was correct, but pages router had the wrong thing. Let me know if I should add a redirect for this somewhere?
-
Benjamin Woodruff authored
Follow up to https://github.com/vercel/next.js/pull/83246#discussion_r2366553689 Discussed this with @lukesandberg and we can't find a place where it would be very useful, it seems it might've been useful with the old builtin condition syntax (which I removed). It also looks like maybe I forgot to actually wire this up to anything? Whoops. Whelp, now it's gone.
-
- 22 Sep, 2025 4 commits
-
-
Luke Sandberg authored
Fix layout for ssgPageRoutes in the file tree there was an extraneous column that messed with offsets accidentally left behind by #83815 Closes NEXT-4727
-
Zack Tanner authored
This removes the env gate that opted into old behavior. Without explicitly setting `scroll-behavior: 'smooth'` on the document, Next.js will not attempt to programmatically disable smooth scrolling when performing certain router events. This is a performance optimization in all cases that do not care about smooth scroll.
-
Benjamin Woodruff authored
~I'm looking for review/feedback, but **DO NOT MERGE UNTIL NEXT 16.0 IS RELEASED.** This is not supported on 15.5, and merging these docs now would be confusing to users. If you want to try it out, use a recent canary release.~ I've been informed that docs are not currently tracking canary, so this is safe to merge. https://github.com/vercel/next.js/pull/82676 adds support for automatically enabling Babel if a babel config is found. Previously we'd exit the process with a hard error explaining that Babel is not supported. Technically you could previously manually configure `babel-loader`, but we had heuristics to detect and warn against that, and you'd need to use a different path for the config file to work around our error message, so it didn't really work properly. (This seems like it was a mistake/oversight) ## Rendered <img src="https://app.graphite.dev/user-attachments/assets/1b4712ba-c2f3-4b02-81ec-f1f9267a545e.png" width=700> <img src="https://app.graphite.dev/user-attachments/assets/6ce60399-8623-4357-8cc1-6443d23eb3c2.png" width=700> <img src="https://app.graphite.dev/user-attachments/assets/36ae8a63-5429-4134-bafd-e0f52b34f718.png" width=700>
-
Benjamin Woodruff authored
Turbopack: Merge babel-loader and react-compiler configuration logic to avoid running babel twice (#83502) Port the logic for configuring react-compiler from JS to Rust. This fixes two issues: - Babel could run twice if you had both react compiler enabled and a babel config file. - We can now emit a warning if we detect you manually configured babel. Previously, this wasn't safe because we could erroneously warn if react compiler was enabled.
-